ampproject / ampproject/amphtml
Allow passing a flag to disable origin checking on the local dev server
- Dominant language
- JavaScript
- Stars
- 14.9k
- Forks
- 4.1k
- PR merge metrics
- No merged PRs in 30d
Description
SSH Reverse proxying (think ngrok) is often used to expose a ports on a local machine, through a port on a VPS.
However, the dev server does some origin checking, and we have an allowed list to only allow certain origins for development. See the following:
https://github.com/torch2424/amphtml/blob/ecefc5f81ff9c1dd1555171a7d5000bdca6bcd1e/build-system/app.js#L193
https://github.com/torch2424/amphtml/blob/ecefc5f81ff9c1dd1555171a7d5000bdca6bcd1e/build-system/app.js#L1370
And here is a place where I make an API Call I want to go through:
https://github.com/ampproject/amphtml/blob/master/extensions/amp-consent/0.1/cmps.js#L33
We should offer a flag like `--disable-origin-check` in the gulp serve command, to allow the API to allow requests from any origin 😄
cc @erwinmombay
Contributor guide
Assessment
This issue has not been assessed yet.