From 5c904dd8e5ee29882c8f735ea7aca96287866a99 Mon Sep 17 00:00:00 2001 From: ViRb3 Date: Sun, 18 Aug 2019 00:01:59 +0100 Subject: [PATCH] Updated Restrict upload using NGINX (markdown) --- Restrict-upload-using-NGINX.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Restrict-upload-using-NGINX.md b/Restrict-upload-using-NGINX.md index 270deb7..7878082 100644 --- a/Restrict-upload-using-NGINX.md +++ b/Restrict-upload-using-NGINX.md @@ -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/)