-
Notifications
You must be signed in to change notification settings - Fork 1
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 readfile() for serving protected uploads #26
Conversation
6722aaa
to
a6da13d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, I've tested this locally, and it still serves assets, so I think the change is fine. However, we need to update the Changelog before merging this.
You need to update the changelog, version string, git tagged version. |
Do we have a recommended local config for testing this plugin on files in |
Is this for saluki testing?
will force uploads to be delivered via |
No, this is for local testing using our |
We've merged other things since this was raised so the version number needs to be checked |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've tested this locally with Saluki and it's working, just needs version number updating.
readme.txt
Outdated
- Where to redirect visitors who are not logged in and try to view restricted content | ||
- Whether to automatically restrict access to uploads by default | ||
- A max age for the cache-control header that will be served to any users who try to access restricted content when not logged in | ||
|
||
== Development == | ||
|
||
https://github.com/dxw/dxw-members-only | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@RobjS there are two README files in this plugin and this one is not displayed by default in GitHub. I'm inclined to delete it. wdyt?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I think this is an artifact of when we published the plugin on the WordPress directory, but that's not the case in anymore, so happy to delete.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it's a WordPress plugin it should be using the Wordpress plugin conventions regardless of if it's published imo.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think, for example, plugins that display changelogs expect them to be in readme.txt
I suspect that one performance problem we have stems from loading binary files into memory, and then using `echo()` to send them to the client. This switches off output buffering and uses `readfile()`.
This header, if recieved by nginx, applies the following: ``` gzip off; fastcgi_buffering off; ``` (The header is not passed to the client.)
This repository has two readme files, this is the one that is not displayed in GitHub. The information in the files is duplicated so we can just remove this.
I suspect that one performance problem we have stems from loading binary files into memory, and then using
echo()
to send them to the client.This switches off output buffering and uses
readfile()
.