0
votes

I have a angular application hosted as IIS website with URLRewrite (https://www.iis.net/downloads/microsoft/url-rewrite) module in an on-premise environement. This module provides rewriting capabilities based on rules for the requested URL address and the content of an HTTP request. Now I am trying to host the application using the Static website hosting available in Azure (https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blob-static-website).

All the Rewrite rules are managed in the web.config file in the current on-premise solution. Also this application is using Akamai CDN for accelerating the content delivery.

Can anyone help me to know how to manage the URLRewrite module equivalent at Azure Blob Storage level.

1

1 Answers

0
votes

You can use azure function proxy where your site is deployed. Here is for frontend you will have every url starting with /api.

{
    "$schema": "http://json.schemastore.org/proxies",
    "proxies": {
        "root": {
            "matchCondition": {
                "route": "/api/{*route}",
                "methods": [
                    "GET",
                    "HEAD"
                ]
            },
            "backendUri": "https://my-dot-net-server/{*route}": {
                //If you want to override any headers
            }
        }
   }
}

The above proxy will redirect your request to dotnet url and send the response. For more details, you could refer to this article about making requests to Angular routes work.