upload icon indicating copy to clipboard operation
upload copied to clipboard

Turn off PHP proxy when OSS is enabled.

Open littlegolden opened this issue 4 years ago • 6 comments

In addition, if we turn on Qiniu OSS or AWS S3, should we turn off proxy download? If the server is used for proxy download, the download speed will be limited by the server configuration rather than the client bandwidth.

And we replied at #207 :

By disabling the proxy, you reduce the load on your server and can profit from the CDN speed, but you loose access restriction and download count features.

Does "access restriction" means "anti-theft chain protection"? This function has generally provided by CDN and OSS service providers.

littlegolden avatar Apr 04 '20 17:04 littlegolden

When you disable the proxy, you loose both the "hot linking prevention" feature (if that was enabled) and you also lose the ability to restrict who can download the file via the permissions.

So that's why I don't think it makes sense to disable it automatically.

Some people might be using CDN for client speed. Other might simply use it for the storage space or backup features. I think the current set of permissions allows doing both. Maybe we should name the options better or rework the UI ?

clarkwinkelmann avatar Apr 04 '20 19:04 clarkwinkelmann

@clarkwinkelmann Hi, I want to turn off PHP proxy. How to do that?

qazwsdc avatar Apr 15 '20 16:04 qazwsdc

It's been a while I have looked at how the extension works. I am actually not even sure that disabling the proxy is possible at all.

We have two existing settings at this time, Disable hotlink protection and Disable logging downloads. Neither of them changes the fact that we proxy the download through a Flarum controller.

Given how the extension is currently designed, there's no way to completely skip the Flarum controller. However that controller could issue a 301 or 302 redirect to the actual resource after performing its role, instead of proxying the content.

I think this will require a refactoring of how the the adapter system works. So I'd say it's unlikely to happen without funding.

clarkwinkelmann avatar Apr 24 '20 22:04 clarkwinkelmann

But I can't see a 301 or 302 redirect when I use it. It's proxying the content insteadly.

qazwsdc avatar Apr 26 '20 11:04 qazwsdc

@qazwsdc that was my suggestion of how we could make it work. Currently proxy seems like the only implemented option :wink:

clarkwinkelmann avatar Apr 26 '20 15:04 clarkwinkelmann

Hope to achieve that.....PLEASE

qazwsdc avatar Apr 26 '20 15:04 qazwsdc