Skip to content
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

Merged
merged 3 commits into from
Jan 24, 2024
Merged

Conversation

Vsion
Copy link
Collaborator

@Vsion Vsion commented Jan 23, 2024

💻 变更类型 | Change Type

  • ✨ feat
  • 🐛 fix
  • 💄 style
  • 🔨 chore
  • 📝 docs

🔀 变更说明 | Description of Change

feat: support pwa, add bundle-analyzer

📝 补充信息 | Additional Information

ref: #8

@yunti-bot
Copy link

👍 @Vsion


Thank you for raising your pull request and contributing to our Community
Please make sure you have followed our contributing guidelines. We will review it as soon as possible.
If you encounter any problems, please feel free to connect with us.
非常感谢您提出拉取请求并为我们的社区做出贡献,请确保您已经遵循了我们的贡献指南,我们会尽快审查它。
如果您遇到任何问题,请随时与我们联系。

@Vsion Vsion mentioned this pull request Jan 23, 2024
5 tasks
@Vsion
Copy link
Collaborator Author

Vsion commented Jan 24, 2024

原 pr 讨论 #16 (comment)

.env.example Outdated
#############################################

# oidc server url
OIDC_SERVER_URL=[oidc_server_url]/oidc
Copy link
Collaborator

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
Copy link
Collaborator

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 不考虑上述情况的话,这个变量可以省略

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已经去掉, 服务端改为从 next/headers 中获取, 客户端 location.origin

@Carrotzpc Carrotzpc merged commit 6122d7d into kubeagi:main Jan 24, 2024
1 check passed
@yunti-bot
Copy link

❤️ Great PR @Vsion ❤️


The growth of project is inseparable from user feedback and contribution, thanks for your contribution!
项目的成长离不开用户反馈和贡献,感谢您的贡献!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants