Azure Functions Python Sample that re-write dynamic and static page url using Azure Functions Proxies
Trigger | In/Out Bindings |
---|---|
HTTP Trigger | output:HTTP |
{
"$schema": "http://json.schemastore.org/proxies",
"proxies": {
"url-rewrite-static": {
"matchCondition": {
"route": "/static/{page}",
"methods": [
"GET"
]
},
"backendUri": "https://<your-blob-account>.blob.core.windows.net/staticpage/{page}"
},
"url-rewrite-dynamic": {
"matchCondition": {
"route": "/content/{contentid}"
},
"backendUri": "https://<func_app_account>.azurewebsites.net/api/<func_name>?contentid={contentid}"
}
}
}
For static access
https://<func_app_account>.azurewebsites.net/static/lasvegas.html
For dynamic access
https://<func_app_account>.azurewebsites.net/content/{contentid}