dimas-b commented on code in PR #147:
URL: https://github.com/apache/polaris-tools/pull/147#discussion_r2737095149
##########
console/src/api/auth.ts:
##########
@@ -21,14 +21,11 @@ import axios from "axios"
import { apiClient } from "./client"
import { navigate } from "@/lib/navigation"
import { REALM_HEADER_NAME } from "@/lib/constants"
+import { config } from "@/lib/config"
import type { OAuthTokenResponse } from "@/types/api"
-// Always use relative URL to go through the proxy (dev server or production
server)
-// This avoids CORS issues by proxying requests through the server
-// The server.ts proxy handles /api routes in production, and Vite handles
them in development
-const TOKEN_URL = "/api/catalog/v1/oauth/tokens"
+const TOKEN_URL = `${config.POLARIS_API_URL}/api/catalog/v1/oauth/tokens`
Review Comment:
nit: this whole endpoint is deprecated in the Iceberg REST API spec, which
is apparently what defines the URI suffix here.
I believe it is preferable to make the whole URI configurable and avoid
assuming a particular suffix.
Since it's not a material change in this PR, this can be addressed later.
--
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]