L2-Technology / sensei

A lightning node implementation for everyone
https://l2.technology/sensei
Other
199 stars 39 forks source link

fix cors and add allow origins cli opt #120

Closed johncantrell97 closed 1 year ago

johncantrell97 commented 1 year ago

Removes the 'development-mode' and the half-baked cors support.

This adds allow-origins cli opt for specifying origins that should be allowed to make requests to the server. It allows credentials, mirrors headers, and mirrors methods but enforces a strict origin match.

This means by default it does not allow cross origin requests unless --allow-origins is used to whitelist origins.

When developing the web-admin you will need to allow requests from the development server --allow-origins=http://localhost:3001 or whatever port you are using to serve it from.