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

refactor: replace custom server with default server in development #79

Closed
wants to merge 1 commit into from
Closed

Conversation

Fantasy15
Copy link

💻 变更类型 | Change Type

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

🔀 变更说明 | Description of Change

refactor: replace custom server with default server in development

📝 补充信息 | Additional Information

  1. just add one proxy context '/kubeagi-apis'
  2. The next step is to replace with the default server in PROD enviroment, which supports HTTPS. By doing so, the project can reduce third-party dependencies and enjoy the optimization of default servers
  3. In the longer term, it is possible to package only the client code with Next.js, SSR may not appear necessary, and the project may not require SEO. By doing so, it is possible to reduce the cost for front-end engineers to maintain the server (concurrency and transactions, as well as possible interactions with cache and message queues, even under isomorphism), as well as the potential single point of failure that projects may encounter in the server environment

@yunti-bot
Copy link

👍 @Fantasy15


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.
非常感谢您提出拉取请求并为我们的社区做出贡献,请确保您已经遵循了我们的贡献指南,我们会尽快审查它。
如果您遇到任何问题,请随时与我们联系。

Copy link
Collaborator

@Carrotzpc Carrotzpc left a comment

Choose a reason for hiding this comment

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

官方 rewrites 不支持非信任 https 证书的 server 的转发( vercel/next.js#21537 ),而内部开发环境 server 都是非信任的 https 证书,所以 dev 这里暂时不能改成使用 next dev

@Fantasy15
Copy link
Author

Fantasy15 commented Apr 8, 2024

@Carrotzpc
Copy link
Collaborator

官方 rewrites 不支持非信任 https 证书的 server 的转发( vercel/next.js#21537 ),而内部开发环境 server 都是非信任的 https 证书,所以 dev 这里暂时不能改成使用 next dev

我的意思是我们需要 rewrites 的 '/kubeagi-apis' 对应的 api server 在我们开发环境都是自签名的非信任 https 证书,所以用官方的 rewrites 不行,跟 agent-portal 本身是否是 https 方式启动的没有关系 @Fantasy15

@Fantasy15
Copy link
Author

Unable to testing all the sitution without an internal testing account, however, in the case of being logged out, the refactored branch just works under local dev

@Fantasy15 Fantasy15 closed this Apr 8, 2024
@Fantasy15 Fantasy15 deleted the refactor branch April 8, 2024 08:51
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