Is it possible to allow cors for localhost requests in routers of gateway? #1464
Closed
davychxn
started this conversation in
Feature Requests
Replies: 2 comments 1 reply
-
I have this: |
Beta Was this translation helpful? Give feedback.
0 replies
-
If the application is strictly for personal or trusted use that's fine. If you intend to publish it to users, you shouldn't publicly expose the gateway to call it from the browser directly (otherwise anyone can make inference calls). For security reasons, we won't mess with CORS in the gateway directly. You can do this by setting up a proxy service like Nginx in front of your gateway. Alternatively, you can call the gateway from a minimal backend service, and call this backend service from your browser. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I was experimenting calling gateway inference service using fetch of JavaScript, blocked by cors checking of browser.
I think allowing cors for localhost requests might be a solution with not much risk?
What's your opinion?
Beta Was this translation helpful? Give feedback.
All reactions