i have deployed asp.net in docker on ec2 instance ECS, with load balancer
controller weatherforecast working corectly
hotchocolate graphql UI doesnt work on aws, on localhost docker works fine.
I test on postman, and works fine, schema fetched.
Can you help with aws settings, for graphql working
My actual program.cs
builder.Services.AddGraphQLServer().AddQueryType<GraphQls>();
builder.Services.AddCors(
options =>
options.AddPolicy(
"CorsPolicy",
builder =>
{
builder.AllowAnyMethod().AllowAnyHeader().AllowCredentials()
.SetIsOriginAllowed(_ => true);
// #if DEBUG
// .SetIsOriginAllowed(_ => true);
// #else
// .WithOrigins("https://localhost", "https://localhost");
// #endif
}
)
);
var app = builder.Build();
// Configure the HTTP request pipeline.
if (app.Environment.IsDevelopment())
{
app.UseSwagger();
app.UseSwaggerUI();
}
//app.UseHttpsRedirection();
app.UseAuthorization();
app.MapControllers();
app.MapGraphQL();
Best regards