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 Support for API #531

Open
503Dev opened this issue Feb 11, 2022 · 0 comments
Open

CORS Support for API #531

503Dev opened this issue Feb 11, 2022 · 0 comments

Comments

@503Dev
Copy link

503Dev commented Feb 11, 2022

Is your feature request related to a problem? Please describe.
When attempting to access the api endpoints via http get with fetch or axios a CORS error is returned as it appears Flask CORS is not enabled.

Describe the solution you'd like
Enable Flask CORS for the api endpoints.

Describe alternatives you've considered
NA - From the client using the api provided by mariner there is no way to circumvent CORS.

Additional context
I am running mariner3d on a local pi zero. I have my own dashboard to aggregate multiple printers and use axios to grab api endpoints. I can easily access the api endpoint server side but using a react app or a browser app I get a CORS error due to cross-origin header not being sent by server. I believe the fix is to use Flask CORS however I am not sure how to edit the live install of mariner3d. I know where to edit the source but not sure how to edit the live install.

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

No branches or pull requests

1 participant