-
Notifications
You must be signed in to change notification settings - Fork 167
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ASP.NET Core integration with ConfigureFunctionsWebApplication overwrite host url in the bindings of request (HttpRequestData) #2071
Comments
My solution was to configure OpenAPI using the port information found in launchSettings.json. In your case Overriding Base URLs .
.
.
.ConfigureServices(services =>
{
services.AddSingleton<IOpenApiConfigurationOptions>(_ =>
{
var options = new OpenApiConfigurationOptions()
{
Servers = new List<OpenApiServer>()
{
new OpenApiServer() { Url = "http://localhost:7141/api/" }
}
};
return options;
});
})
.
.
. |
Good to know that there is a workarround. But I hope this is properly solved in the future. |
@Schulungkubanetis should this me move to/tracked in the OpenAPI extension repo? Thanks! |
My undestanding ist that the url from the host which comes normaly with https://github.com/Azure/azure-functions-dotnet-worker/blob/main/src/DotNetWorker.Grpc/Http/GrpcHttpRequestData.cs is overwrite with https://github.com/Azure/azure-functions-dotnet-worker/blob/main/extensions/Worker.Extensions.Http.AspNetCore/src/HttpDataModel/AspNetCoreHttpRequestData.cs which get the url in AspNetCoreHttpRequestDataFeature from the generated httpcontext which is not equal. |
@Schulungkubanetis thank you for the additional details. This is a little clearer now. Will take a look at this in the coming sprint. |
Thank you all. We have clarity on the issue here and will have an update to address this behavior as soon as possible. |
There is a problem to use the request url of HttpRequestData when using the ConfigureFunctionsWebApplication extension method.
Therefore the openapi integration https://github.com/Azure/azure-functions-openapi-extension is not working because the asp integration overwrite the url of HttpRequestData.
Is it possible to change the integration to a proper mapping so the primary values come from the binding and not form the default values of the asp integration itself?
The text was updated successfully, but these errors were encountered: