-
Notifications
You must be signed in to change notification settings - Fork 10
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
feat: support pwa, add bundle-analyzer #17
Conversation
👍 @Vsion |
原 pr 讨论 #16 (comment) |
.env.example
Outdated
############################################# | ||
|
||
# oidc server url | ||
OIDC_SERVER_URL=[oidc_server_url]/oidc |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
需要说明下,我们把请求中写死的 /oidc 去掉是因为 oidc_server_url 本身是带 /oidc 的,不是 oidc_server_url 地址后面要加个 /oidc,这里可以在备注里加个例子,比如 https://kubeagi.com/oidc
.env.example
Outdated
CLIENT_SECRET=client_secret | ||
|
||
# origin | ||
CLIENT_ORIGIN=http://localhost:3000 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
origin 本身是可以取到的,不需要配置,这个变量之前就有点儿犹豫是否必要,留下的主要考虑是:
- 后端渲染时可能取不到正确的取值(部署环境代理等问题),不过也可以由浏览器端获取到然后通过 query 带给后端
- 不过这就带来了第二个问题,portal 部署后,我们可以通过域名或者 ip 的方式访问,这样的话获取到的 origin 不是固定的,可能会由于 oidc 未配置相关 callback 地址导致不同方式的访问实际表现不一致
@nkwangleiGIT 不考虑上述情况的话,这个变量可以省略
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
已经去掉, 服务端改为从 next/headers 中获取, 客户端 location.origin
❤️ Great PR @Vsion ❤️ |
💻 变更类型 | Change Type
🔀 变更说明 | Description of Change
feat: support pwa, add bundle-analyzer
📝 补充信息 | Additional Information
ref: #8