Azure / Azure/static-web-apps

Add proxy support

Open
#65 3 comments 16 reactions 0 assignees View on GitHub
enhancement routing
Dominant language
No language data
Stars
346
Forks
67
PR merge metrics
No merged PRs in 30d

Description

Originally reported by @MarkXA

Is your feature request related to a problem? Please describe.
One of my static sites allows users to subscribe to a calendar at /events.ics. This URL is proxied through to https://uglyblobstorage.url/container/events.ics, which is regularly updated by an Azure Function on a timer trigger. It would be good to be able to do this in Static Web Apps.

Describe the solution you'd like
Add a proxies feature to routes.json. Just nick the Azure Functions Proxies code, I'm sure they won't mind ;)

Describe alternatives you've considered
A 302 redirect sort of works for now, but it's possible that if the backend URL changed then it would break people's subscriptions, and anyway you don't always want the ugly URL exposed.

Additional context
This can also be useful for hosting external APIs as a local /api (e.g. non-JS Azure Functions 😱), particularly if you can't configure their CORS.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.