starter
starter copied to clipboard
Add CORS with allowed origins
This adds CORS to the app. It allows you to specify, via environmental variables, which allowed origins you can use. This is useful for a variety of scenarios and is specifically useful in the case of using this server for an API or accessing it from other origins (like using Ionic).
Allow us to pass a list of domains allowed for CORS:
CORS_ALLOWED_URLS=http://localhost:8100,https://mobile.mydomain.com