You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Preflighted requests in for CORS send a HTTP OPTIONS requests to the server to ask for permission to use the resource cross origins. Polaris does not currently seem to handle OPTIONS requests, nor provide any of the CORS headers.
Use case: Develop polaris-web while using a remotely hosted polaris api instance
If the API is meant to be public, then enabling CORS should not be an issue. At least as an optional flag.
It seems like the default behavior for Rocket on this topic have been debated for some years and the current situation is that they don't handle it at all. But there exist a nice crate called rocket_cors which might be the solution.
For the curious, here is my dirty patch to make polaris-web use a remote endpoint
Preflighted requests in for CORS send a HTTP
OPTIONS
requests to the server to ask for permission to use the resource cross origins. Polaris does not currently seem to handleOPTIONS
requests, nor provide any of the CORS headers.Use case: Develop
polaris-web
while using a remotely hostedpolaris
api instanceIf the API is meant to be public, then enabling CORS should not be an issue. At least as an optional flag.
It seems like the default behavior for Rocket on this topic have been debated for some years and the current situation is that they don't handle it at all. But there exist a nice crate called rocket_cors which might be the solution.
For the curious, here is my dirty patch to make polaris-web use a remote endpoint
The text was updated successfully, but these errors were encountered: