api-management-developer-portal icon indicating copy to clipboard operation
api-management-developer-portal copied to clipboard

Allow overriding API hostnames

Open mikebudzynski opened this issue 4 years ago • 10 comments

Allow specifying a list of custom hostnames for an API to be displayed in the developer portal instead of the API Management's domain. Sample scenario: APIM is fronted by another service.

mikebudzynski avatar Mar 23 '21 17:03 mikebudzynski

Another scenario is when using a wildcard certificate in Azure API Management and some APIs may only be called using certain hosts.

ErikMogensen avatar Mar 23 '21 18:03 ErikMogensen

Would this feature also allows to add a local host address to the list? And would it be possible for a portal user to extend the list with other local host addresses for different ports?

AnRei123 avatar Mar 30 '21 15:03 AnRei123

Would this feature also allows to add a local host address to the list? And would it be possible for a portal user to extend the list with other local host addresses for different ports?

At this moment, we don't have the feature designed yet. Thanks for the feedback, we will incorporate it once we start working on this functionality.

mikebudzynski avatar Mar 30 '21 17:03 mikebudzynski

Would be great to have the path customizable as well.

We use different hostnames per API fronted by an Application Gateway and redirect them to the managed gateway with path/ host rewrites.

patst avatar Apr 13 '21 10:04 patst

We want to be able to specify which of the gateway names to display, e.g. we want our sandbox hostname to be the default and not the production gateway as we only want developers in the portal to interact with the sandbox endpoints.

smokedlinq avatar May 09 '21 16:05 smokedlinq

I'm also interested in this feature and was wondering if using something like the X-Forwarded-Host header would be a reasonable idea. This way in the Azure App Gateway one could configure a rule to add the appropriate X-Forwarded-Host. Also, ideally the call to the management api hostnames would not be used for generating the sampleHostname.

shaneholder avatar Jul 10 '21 18:07 shaneholder

I'm also interested in this feature and was wondering if using something like the X-Forwarded-Host header would be a reasonable idea. This way in the Azure App Gateway one could configure a rule to add the appropriate X-Forwarded-Host. Also, ideally the call to the management api hostnames would not be used for generating the sampleHostname.

@shaneholder, could you clarify how the X-Forwarded-Host header is related to displaying a custom hostname in the developer portal? Header is strictly on the API runtime side and could be used by the API gateway, while the custom hostname in the developer portal is just API's metadata.

mikebudzynski avatar Jul 20 '21 20:07 mikebudzynski

We are hosting the developer portal behind an application gateway. We could add something like the x-forward-host header to indicate to the dev portal the base URL we actually want to use. This could then be used to override the base URL. It might be slightly hacky but it's in line with how App Services work. I realize that there are side-band calls to go get the API information and that the URL's for the API's are not actually part of the portal but this might be better than needing to configure APIM custom hostnames and certs, esp in cases where there are requirements to have a WAF in play.

shaneholder avatar Aug 04 '21 12:08 shaneholder

@mikebudzynski would you be able to share if this being worked on currently? This feature would make the portal a lot more usable in our case.

Thanks!

adahlinvcrs avatar Apr 28 '23 12:04 adahlinvcrs

We're in a similar situation where APIM is behind an Azure App Gateway and the gateway hostname of APIM differs from the AGW hostname. Are there any updates on this issue?

ronaldbosma avatar Apr 04 '24 12:04 ronaldbosma