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

Bug反馈:关于Waline插件的请求体和请求头参数不可用的问题 #240

Open
Inetgeek opened this issue Jan 13, 2023 · 4 comments

Comments

@Inetgeek
Copy link

Inetgeek commented Jan 13, 2023

您好,我最近在使用Waline评论系统的插件,发现按照配置文件里设置waline参数时,很多图床的token需要放到请求体里提交,但stellar是默认放到请求头里提交,导致图床api不可用。


stellar里的waline插件代码如下,已经写死了token是放到header里:
image
请求的API显示缺少token参数,因为很多图床API的token 放到了body(payload)里:
sss
image


很多图床还有另外的一些必须携带的参数,如下:
image

建议

  • 可自定义参数
  • 可自定义参数存放位置
@Inetgeek
Copy link
Author

Inetgeek commented Jan 13, 2023

我本地修改/layout/_partial/plugins/comments/waline/script.ejs文件后正常上传图片
image
image

@i-abc
Copy link
Contributor

i-abc commented Jan 14, 2023

这部分是我改的,目前只适配常见的兰空图床V1、V2,兰空图床 api 中 token 确实是放在请求头里的。
其他图床我没用过,没办法测试,也就没法适配。
你这图床挺高级的,还是第一次见,用户还能选择 CDN,欢迎 pr。

@i-abc
Copy link
Contributor

i-abc commented Jan 24, 2023

walinejs/waline#1755

@xaoxuu
Copy link
Owner

xaoxuu commented Feb 7, 2024

如果需要支持其它图床api,请pr一下,不需要的话这个issue就关了。

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