Search code examples
amazon-web-servicesazureapi-gateway

http to https endpoint with Azure


With AWS I can convert a http to a https endpoint with API Gateway and CloudFront, and I get an URL like below,

https://4z9giyi2c1.execute-api.us-west-2.amazonaws.com/test/petstore/pets?type=fish

How can do I the same with Azure?


Solution

  • Azure Front Door is the option you require.

    This service provides a combined Web Application Firewall, Traffic Manager (for routing) and CDN all in one service. More importantly, unlike the other plain CDNs Azure offers, it allows for SSL termination:

    You can configure the routing rule to accept either one of http or https only, or both, and then the route details allow you to specify whether the request is passed on as HTTPS Only, HTTP Only (what you want) or "Match Request":

    Routing options within Front Door

    You could then set up a subsequent rule for non-HTTPS traffic that redirects to HTTPS, forcing all traffic to be secure.