adutra commented on code in PR #147: URL: https://github.com/apache/polaris-tools/pull/147#discussion_r2738163319
########## console/README.md: ########## @@ -45,12 +45,70 @@ Create a `.env` file based on `.env.example`: ```env VITE_POLARIS_API_URL=http://localhost:8181 -VITE_POLARIS_REALM=POLARIS +VITE_POLARIS_REALM=POLARIS VITE_POLARIS_PRINCIPAL_SCOPE=PRINCIPAL_ROLE:ALL VITE_POLARIS_REALM_HEADER_NAME=Polaris-Realm # optional, defaults to "Polaris-Realm" -VITE_OAUTH_TOKEN_URL=http://localhost:8181/api/v1/oauth/tokens # optional +VITE_OAUTH_TOKEN_URL=http://localhost:8181/api/catalog/v1/oauth/tokens # optional, defaults to ${VITE_POLARIS_API_URL}/api/catalog/v1/oauth/tokens ``` +> **Note:** The console makes direct API calls to the Polaris server. Ensure CORS is properly configured on the server (see below). + +### Server-Side CORS Configuration + +The console makes direct API calls to the Polaris server. Configure CORS on your Polaris server (Quarkus-based). + +#### Option 1: Using application.properties + +Add to your Polaris `application.properties` file: + +```properties +quarkus.http.cors.enabled=true +quarkus.http.cors.origins=http://localhost:5173,https://your-console-domain.com +quarkus.http.cors.methods=GET,POST,PUT,DELETE,PATCH,OPTIONS +quarkus.http.cors.headers=Content-Type,Authorization,Polaris-Realm Review Comment: Hmm you added it only for environment variables, it seems 😅 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
