mirror of
https://github.com/dreamhunter2333/cloudflare_temp_email.git
synced 2026-04-26 06:15:52 +03:00
[GH-ISSUE #231] [Feature]能否在前端里面内部连接到后端? #73
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/cloudflare_temp_email#73
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Zding89 on GitHub (May 13, 2024).
Original GitHub issue: https://github.com/dreamhunter2333/cloudflare_temp_email/issues/231
请描述您的 Feature
网站如果不翻打开,会在进入页面后有个等待loading后端的过程,如果后端用默认的worker的话基本是连不上,绑定了自定义域名可以连上,但第一次打开,等于先等待连通过一次cf代理的前端,再等待联通cf代理的后端,速度体验欠佳。
描述您想要的解决方案
能否在pages的前端就内部连到worker后端?这样worker就不用再增设一个自定义域名,而且打开则能直接使用而不用再次等后端连接。
@dreamhunter2333 commented on GitHub (May 13, 2024):
应该可以的,使用这个就行,我有空集成下
https://developers.cloudflare.com/pages/functions/bindings/#service-bindings
@dreamhunter2333 commented on GitHub (May 14, 2024):
成功部署了一版,可以试试速度,https://mail-pages.awsl.uk
目前代码在 main 分支,可以参考此处的文档: https://github.com/dreamhunter2333/cloudflare_temp_email/blob/main/vitepress-docs/docs/zh/guide/cli/pages.md
@Zding89 commented on GitHub (May 14, 2024):
试了下打开速度快了很多,而且我原来不开🪜出不了cf验证,现在可以了,不知道是不是错觉。
后面的操作则跟普通版一样会有转圈
@dreamhunter2333 commented on GitHub (May 14, 2024):
cf验证会请求 cf 的api, 和这个应该没关系. 转圈应该还是网络问题,即使 pages 转发也还是慢
@Zding89 commented on GitHub (May 14, 2024):
可能吧,有时候不开工具,cf那个验证出不来,可能今天网络好
@dreamhunter2333 commented on GitHub (May 15, 2024):
自建可以不配置 cf 验证