logdyhq / logdy-core

Web based real-time log viewer. Stream ANY content to a web UI with autogenerated filters. Parse any format with TypeScript.
https://logdy.dev
Apache License 2.0
1.25k stars 32 forks source link

diable CORS security? #49

Open EtainLove opened 2 months ago

EtainLove commented 2 months ago

is there any way to disable CORS security? I could not find any options in the source code.

PeterOsinski commented 2 months ago

Hi, currently there is no way to add CORS headers. May I ask about your use case, what is the setup so that the UI address is different than the backend?

EtainLove commented 2 months ago

I have my own frontend to show log messages from PM2. For that I need to connect to ws://localhost:8080. So there is the CORS issue. Did I miss something to use alternative frontend to bypass the CORS issue?

I could do bypass the CORS issue by modifying the logdy-core of v.0.10.0, but could not for v0.13.0 version.

FYI, my frontend is Flutter web and need to parse log messages.

PeterOsinski commented 2 months ago

Would adding a Access-Control-Allow-Origin with a specific value work? For example

logdy --cors-origin=http://abc.com
EtainLove commented 2 months ago

that would work. If possible, multiple origins or allowing all origins would be better.