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

KV设置正确 进入图片管理页时报错 详细图文描述 跪求大佬解答 #148

Closed
smallcutesheep opened this issue Jul 4, 2024 · 9 comments

Comments

@smallcutesheep
Copy link

屏幕截图1 edge浏览器,进入admin管理页后弹出错误提示 屏幕截图 2024-07-04 191547 点击“确定”后,出现错误信息 屏幕截图 2024-07-04 191729 KV创建正常

屏幕截图_4-7-2024_19432_dash cloudflare com
KV变量无数据

屏幕截图_4-7-2024_194447_dash cloudflare com
控制台函数KV命名空间正常

屏幕截图_4-7-2024_194544_dash cloudflare com
无任何环境变量
最新设置已部署(上四图)

屏幕截图 2024-07-04 194628 上传页可以正常访问 屏幕截图 2024-07-04 204758 图片上传成功 上传页正常
@cf-pages
Copy link
Owner

cf-pages commented Jul 4, 2024

后台管理功能需要添加环境变量,具体请查看项目的README.md
2、后台管理页面新增登录验证功能,默认也是关闭的,如需开启请部署完成后前往后台依次点击设置->环境变量->为生产环境定义变量->编辑变量 添加如下表格所示的变量即可开启登录验证

@smallcutesheep
Copy link
Author

大佬添加环境变量后还是进不去管理页
屏幕截图_5-7-2024_16622_dash cloudflare com
其它设置都保持不变 已重新部署 还是一样的提示
屏幕截图 2024-07-05 160934
屏幕截图 2024-07-05 161104
重新部署后上传页依然可以上传图片、生成外链和加载图片
屏幕截图 2024-07-05 161419
屏幕截图 2024-07-05 161530
再次求大佬解答 @cf-pages

@cf-pages
Copy link
Owner

cf-pages commented Jul 5, 2024

添加完环境变量后,是否有重新部署?
具体可以参考README.md
另外针对环境变量所做的更改将在下次部署时生效,如更改了环境变量,针对某项功能进行了开启或关闭,请记得重新部署。

@cf-pages
Copy link
Owner

cf-pages commented Jul 5, 2024

另外请参考之前其他人提出的 issue #83

@cf-pages
Copy link
Owner

cf-pages commented Jul 5, 2024

请参考issue #22
另外,检查一下环境变量有没有设置正确,注意有下划线,截图当中显示不出来

@smallcutesheep
Copy link
Author

好的谢谢作者们! 这两天不在家,回去了就试试!

@a-w-1806
Copy link

a-w-1806 commented Jul 7, 2024

大家好!我碰到了一样的问题,并且试了一下添加BASIC_USER BASIC_PATH,这样的确可以正常打开admin了。看来只有不设置环境变量的时候会有这个error?我其实本来打算用cloudflare Access的。

@a-w-1806
Copy link

a-w-1806 commented Jul 7, 2024

我又试着把这两个env var删掉,再重新部署,看到了这个
image
image
image

@smallcutesheep
Copy link
Author

谢谢作者!谢谢朋友们!问题已成功解决!

我的解决方法就是 issue #83 那封邮件的三张图(issue #83中有)
屏幕截图 2024-07-08 123458
三张图片在issue #83 中的定位
也可以直接看我的 #83 截图
屏幕截图_8-7-2024_12437_github com
提醒一下,按那三张图片重新部署完成后需要再访问一遍已上传的图片后才能在后台看到你的图片
感谢作者 @cf-pages 和相同问题的朋友 @rational-stars
第一次在github提问题太激动辣!
另外我建议 @a-w-1806 这位老哥新建一个issue可以被更多人看到
就这么多,closed了~

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

No branches or pull requests

3 participants