Updated Restrict upload using NGINX (markdown)
parent
b2eeb811f7
commit
5c904dd8e5
1 changed files with 1 additions and 1 deletions
|
@ -2,7 +2,7 @@
|
|||
This is a neat and effective way to restrict paste uploading using NGINX without breaking anything and without modifying PrivateBin.
|
||||
|
||||
## Approach
|
||||
An artificial authentication page is created using NGINX, which, if provided with the correct credentials, will set a cookie with a secret key. All POST requests to the server are restricted using NGINX and only allowed if this secret key is provided. This allows viewing pastes by anyone but not uploading.
|
||||
An authentication page is created using NGINX, which, if provided with the correct credentials, will set a cookie with a secret key. All POST requests to the server are restricted using NGINX and only allowed if this secret key is provided. This allows viewing pastes by anyone but not uploading.
|
||||
|
||||
## Setup
|
||||
1. Create your credentials file at: `/etc/nginx/.htpasswd`. You can use the [htpasswd](https://linux.die.net/man/1/htpasswd) tool, tutorial [here](https://www.cyberciti.biz/faq/create-update-user-authentication-files/)
|
||||
|
|
Loading…
Reference in a new issue