Closed mrocha98 closed 1 year ago
I'm not fully sure if the express middleware is the right place for adding CORS headers, as you would typically need to run this service behind a load balancer anyways (e.g. nginx, caddy, haproxy, ..., also for doing TLS termination).
Just to ensure I understand you motivation here, would you also want me to enable CORS on https://gwfh.mranftl.com? I'm afraid this is not going to happen.
Good call, I forgot that Nginx can handle this, much better approach since I'm self hosting.
Thanks for your reponse ✌️
This PR adds support for CORS via environment variable (true by default, feel free to change to false)
Motivation: I'm developing an alternative client and all requests fails because of CORS error
resolves #90