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

Still have the same issue that the endless 302 redirect happens #3

Closed
Y2Nk4 opened this issue Oct 6, 2019 · 7 comments
Closed

Still have the same issue that the endless 302 redirect happens #3

Y2Nk4 opened this issue Oct 6, 2019 · 7 comments

Comments

@Y2Nk4
Copy link

Y2Nk4 commented Oct 6, 2019

I tried to use nextcloud as a CDN server which is also what this plugin doing.
When I was using the official function, adding "/download" at the end of the share link and put it in the video tag in a web page, it will cause an endless 302 redirect as what this issue is talking about.
nextcloud/server#542

So I tried this plugin, but still, the endless 302 redirects are still happening. So I wanna check if there is any way to fix this problem.

@rookie0
Copy link
Owner

rookie0 commented Oct 8, 2019

Please check the sharing path can be accessed first.

Then check your access.log to find the request detail, maybe failed at CDN and did not reach your nextcloud server.

@Y2Nk4
Copy link
Author

Y2Nk4 commented Oct 9, 2019

Yes, the link cloud be accessed by a browser, or be downloaded directly, but when I embed it in the video tag in html, it will show an endless 302 redirect. I think this is because of the nextcloud itself.

@Y2Nk4
Copy link
Author

Y2Nk4 commented Oct 9, 2019

You could check this issue in NextCloud repo to see, nextcloud/server#542

@Y2Nk4
Copy link
Author

Y2Nk4 commented Oct 9, 2019

哦 我懂你意思了,这个插件是把NextCloud当成CDN源站用。我以为是用于创建直链分享的。想多了hh

@Y2Nk4
Copy link
Author

Y2Nk4 commented Oct 9, 2019

NextCloud文件分享+/download的直链扔在html的video标签无法查看,会导致循环302。只能想其他办法解决了

@rookie0
Copy link
Owner

rookie0 commented Oct 10, 2019

循坏 302 是由于 Nextcloud 的安全策略,看 nextcloud/server#2523 是修复了,具体不清楚,应该是需要在哪里进行配置

简单粗暴的话,可以在 apps/files_sharing/lib/Controller/ShareController.php 中给方法 downloadShare 添加注释 @NoSameSiteCookieRequired

当然,也可以直接用这个插件,加个CDN域配置回源就行

@Y2Nk4
Copy link
Author

Y2Nk4 commented Oct 10, 2019

好的,我看看

@rookie0 rookie0 closed this as completed Oct 11, 2019
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

2 participants