You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the issue
We have Function Apps that are accessed through a Front Door. This gives us some trouble with the URL in the swagger UI as the URL is being resolved to the direct URL of the Function App which is not what we want as it is not accessible and everything should go through the Front Door. Is there a way to configure the URL being set in the Swagger UI? As far as I can tell this is the logic that sets it and it doesn't appear there is a way to change it:
I know that the Front Door will send X-Forwarded-Host and X-Forwarded-Proto which we were able to use with older the older Swashbuckle library which we used for In-Process Function Apps.
To Reproduce
Steps to reproduce the behavior:
Deploy Function App
Configure Front Door
Try to access Swagger UI through Front Door
Observe non-Front Door URL being used
Expected behavior
Front Door URL should be used
Screenshots
The text was updated successfully, but these errors were encountered:
I realize that it is actually possible to change the value by manually specifying the server using the configuration. I'll leave this open for somebody else to judge if it is a good idea to support the header anyway. But I found a "workaround".
This is something we'd very much like in our scenario as well, mostly because of the layers of indirection coming to the function app. At the outermost you couldn't reach the UI, but at the function level you could (because we can't stop that with out-of-proc). We'd still like the UI to be accessible if possible at the function level with the correct URI.
Describe the issue
We have Function Apps that are accessed through a Front Door. This gives us some trouble with the URL in the swagger UI as the URL is being resolved to the direct URL of the Function App which is not what we want as it is not accessible and everything should go through the Front Door. Is there a way to configure the URL being set in the Swagger UI? As far as I can tell this is the logic that sets it and it doesn't appear there is a way to change it:
azure-functions-openapi-extension/src/Microsoft.Azure.WebJobs.Extensions.OpenApi.Core/SwaggerUI.cs
Line 61 in ab184cb
I know that the Front Door will send X-Forwarded-Host and X-Forwarded-Proto which we were able to use with older the older Swashbuckle library which we used for In-Process Function Apps.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Front Door URL should be used
Screenshots
![image](https://private-user-images.githubusercontent.com/2315801/290494845-9cc48baf-0dc2-4668-a035-4aa3b4b52cda.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjE5OTEzNTQsIm5iZiI6MTcyMTk5MTA1NCwicGF0aCI6Ii8yMzE1ODAxLzI5MDQ5NDg0NS05Y2M0OGJhZi0wZGMyLTQ2NjgtYTAzNS00YWEzYjRiNTJjZGEucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDcyNiUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA3MjZUMTA1MDU0WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9ZjAyYmI1Mzk2NDc4ZDIwNjM4ZmQ0NjI0ZWE2N2MyYjA3ZGZiNDYyYWExMjhkZmNkYTVjNjg3MTcyOWFlZjczNiZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.1O_SD3mUBabpZ-mOsCfzu_AXO3STGEzaDBBXazkVTl4)
The text was updated successfully, but these errors were encountered: