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

Use the path ending with / when loading the widget #10520

Closed
3 tasks done
xiaoyi510 opened this issue Mar 5, 2024 · 12 comments
Closed
3 tasks done

Use the path ending with / when loading the widget #10520

xiaoyi510 opened this issue Mar 5, 2024 · 12 comments
Assignees
Milestone

Comments

@xiaoyi510
Copy link

xiaoyi510 commented Mar 5, 2024

挂件访问地址301跳转导致nginx反向代理会报错500的问题

Is there an existing issue for this?

  • I have searched the existing issues

Can the issue be reproduced with the default theme (daylight/midnight)?

  • I was able to reproduce the issue with the default theme

Could the issue be due to extensions?

  • I've ruled out the possibility that the extension is causing the problem.

Describe the problem

思源挂件默认访问地址为 /widgets/drawio
然后他会301自动跳转到 /widgets/drawio/

思源使用了nginx反向代理之后 此操作会导致nginx 500报错

Expected result

要么访问地址直接已 / 结尾

Screenshot or screen recording presentation

image

Version environment

- Version: 3.0.2
- Operating System: docker
- Browser (if used): chrome

Log file

none

More information

No response

@88250
Copy link
Member

88250 commented Mar 5, 2024

挂件的地址手动带上 / 能够解决问题吧?

@88250
Copy link
Member

88250 commented Mar 6, 2024

我先关闭了,如果还有问题请继续跟帖,谢谢 🙏

@88250 88250 closed this as completed Mar 6, 2024
@xiaoyi510
Copy link
Author

我是nginx 转发的.没办法手动带上 / 呢 挂件都是第三方开发的

@xiaoyi510
Copy link
Author

应该让siyuan这边直接不要301跳转 或者设置增加一个 /

@88250
Copy link
Member

88250 commented Mar 11, 2024

插入挂件的时候手动微末加上 / 试试

@xiaoyi510
Copy link
Author

emmm 选择了挂件就自动插入了 貌似没有看到能够在加上/的地方

@xiaoyi510
Copy link
Author

image

@88250
Copy link
Member

88250 commented Mar 11, 2024

点击挂件块块标,菜单里面有。

@xiaoyi510
Copy link
Author

image

对不起 小弟真没看到
属性里面也没有

@88250
Copy link
Member

88250 commented Mar 12, 2024

抱歉,我记错了,记成和 iframe 块一样了。稍后我看看能不能直接就请求带 /

@88250 88250 reopened this Mar 12, 2024
@xiaoyi510
Copy link
Author

还有一个304 响应导致500报错的问题

建议在文档中写一个nginx反向代理设置以下两个能解决

proxy_set_header If-Modified-Since "";

proxy_set_header If-None-Match "";

现在就差这个301的错误解决了 反向代理就没啥问题了

@88250 88250 self-assigned this Mar 13, 2024
@88250 88250 added this to the 3.0.4 milestone Mar 13, 2024
@88250 88250 changed the title 挂件访问地址301跳转导致nginx反向代理会报错500的问题 Use the path ending with / when loading the widget Mar 13, 2024
@88250
Copy link
Member

88250 commented Mar 13, 2024

这个修复不做已有数据订正,所以只有新插入的挂件才会以 / 结尾,请悉知。

@88250 88250 closed this as completed Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants