Closed imnoob404 closed 10 months ago
If you run the official server builds in the standard way, they intentionally don't allow connections from anything but the official UI. This avoids cross-site request forgery style attacks (where a malicious website you visit communicates with local services on your machine).
By default, production builds allow connections only from app.httptoolkit.tech
, which dev builds also allow various localhost URLs. This is defined here.
There's two options:
OCLIF_TS_NODE=0 ./bin/run start
instead of ./bin/httptoolkit-server start
OCLIF_TS_NODE
is required to correctly run a production build (which bundles and drops various dev-only files and dependencies) in dev modeDoes that all make sense?
I'm getting a CORS Related errors on my web browser while trying to access the UI locally. Using https://app.httptoolkit.tech/ works just fine tough.
Here's what I saw from the console log on my browser when trying to open http://local.httptoolkit.tech:8080/:
The errors kept on going and basically the UI just stuck in the "This is taking longer than normal" message and never went through. I've also tried to build the UI first and put the resulting files to my nginx server instead and still got the same errors.
I've tried using Firefox and Chrome browser with no avail. https://app.httptoolkit.tech/ worked just fine with those two browsers. I'm using the latest server build from https://github.com/httptoolkit/httptoolkit-server/releases.
Any idea on what I'm doing wrong here ? I would greatly appreciate any assistance, thank you.