1
votes

Experimenting with the new function proxy feature, I get a http 500 error with a proxy configured as follows:

Route template: /content/{*filename}

Backend URL: https://my-storage-account.blob.core.windows.net/public/{*filename}

Where the backend is just a public container on a blob storage account.

I've tried files with and without a file extension: favicon.ico and just a (text) file called test.

Requesting https://my-function-app.azurewebsites.net/content/favicon.ico yields a 404.

Requesting https://my-function-app.azurewebsites.net/content/test (the file without an extension called "test"), yields a http 500 error.

What am I doing wrong?

Note: I have the /api/ prefix removed by using the routePrefix option in host.json - which works fine for all my functions. Requesting the urls above with the addition of /api/ yields a 404 for both urls.

2

2 Answers

2
votes

It's fixed now. The App Service Team delivered a fix and it's working fine. Just make sure you are using the latest version of Proxy runtime(~0.1) and also upgrade the ROUTING_EXTENSION_VERSION from 0.0.5 to the latest version (currently 0.0.6)

more info: https://www.linkedin.com/pulse/reverse-proxy-using-azure-functions-proxies-thiago-cust%C3%B3dio?published=t

2
votes

In case anyone else makes this same mistake: the problem was the asterix in the backend url: it should just be {filename}, not {*filename}

This might be something which could be checked in the input validation.

Files with extensions in them don't work: favicon.ico still returns 404, but by just stripping off the extension, I got this to work.