Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CORS - Connection Error #2919

Closed
rick-calderon opened this issue Mar 14, 2024 · 3 comments
Closed

CORS - Connection Error #2919

rick-calderon opened this issue Mar 14, 2024 · 3 comments
Labels

Comments

@rick-calderon
Copy link

Hi all, I have a remote deployment of Caldera and I haven't been able to log in because I am getting a connection error related to CORS. A local deployment works as expected.

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://localhost:8888/api/v2/config/main. (Reason: CORS request did not succeed). Status code: (null).

I set the API to allow all PUT requests but that didn't work out for me.

@web.middleware async def pass_option_middleware(request, handler): """Allow all 'OPTIONS' request to the server to return 200 This mitigates CORS issues while developing the UI. """ if request.method == 'PUT': raise web.HTTPOk() return await handler(request)

Has anyone have this issue?

Note: I'm not an API expert.

Copy link

Looks like your first issue -- we aim to respond to issues as quickly as possible. In the meantime, check out our documentation here: http://caldera.readthedocs.io/

@Guil33
Copy link

Guil33 commented Mar 15, 2024

This looks like #2885, check it out.

@rick-calderon
Copy link
Author

This looks like #2885, check it out.

Thanks! Corrected with this. I had to modify the .env file and add the server IP so that it could be accessed from remote devices.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants