You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are planning to use this service i a dynamic environment where we can not foresee the origin URLs upfront. Would it be possible to allow skipping the origin checks altogether, if, for example, an environment variable is set? Obviously the service would then be publicly available, but in our case, we are fine with this or can handle it through origin checks in the network infrastructure.
Hm, wait, this seems to be client side code. Of course process.env is not available then. So then, the ALLOWED_ORIGIN check is probably not for security anyway?
Can we get a build flag to disable it or maybe load the ALLOWED_ORIGINS list from a json file that I can simply clear before building?
// in your events.ts// replace the ALLOWED_ORIGINS definition with an importimportALLOWED_ORIGINSfrom'../allowed_origins.json';
...
constskipOriginCheck=ALLOWED_ORIGINS.length==0||ALLOWED_ORIGINS.includes('*');if(!skipOriginCheck&&!ALLOWED_ORIGINS.includes(parseOrigin(origin))){thrownewError(`Invalid Origin ${origin}`);}
...
We are planning to use this service i a dynamic environment where we can not foresee the origin URLs upfront. Would it be possible to allow skipping the origin checks altogether, if, for example, an environment variable is set? Obviously the service would then be publicly available, but in our case, we are fine with this or can handle it through origin checks in the network infrastructure.
I suggest something to the extend of replacing
nmrium-react-wrapper/src/events/event.ts
Line 50 in 1f1530c
with:
The text was updated successfully, but these errors were encountered: