From 9b2c67b20896a9f90578fd0d99d3e722d5c467f0 Mon Sep 17 00:00:00 2001
From: felixwelter <felixwelter@gmail.com>
Date: Wed, 2 Sep 2020 16:33:53 +0200
Subject: [PATCH] Add instructions for reverse proxy setup

---
 README.md | 24 +++++++++++++++++++++---
 1 file changed, 21 insertions(+), 3 deletions(-)

diff --git a/README.md b/README.md
index e7c0417..c5a9d29 100644
--- a/README.md
+++ b/README.md
@@ -46,9 +46,27 @@ sudo certbot --nginx -d example.com
 
 More details can be found here: https://www.digitalocean.com/community/tutorials/how-to-set-up-let-s-encrypt-with-nginx-server-blocks-on-ubuntu-16-04
 
+# Setup the reverse proxy
 
+Setup a reverse proxy in your nginx config (e.g. `/etc/nginx/sites-available/default`)
 
-
-
-
+If the slide index is hosted with a suffix (e.g. `<YOUR_DOMAIN>/slide-index/search`) make sure
+to adjust the environment variable, which set during the container start. 
+```
+location / {
+    proxy_pass         http://127.0.0.1:8080/;
+    proxy_http_version 1.1;
+    proxy_set_header Upgrade $http_upgrade;
+    proxy_set_header Connection "Upgrade";
+    proxy_set_header Host $host;
+    proxy_buffering off;
+    proxy_connect_timeout       600;
+    proxy_send_timeout          600;
+    proxy_read_timeout          600;
+    send_timeout                600;
+    
+    add_header 'Access-Control-Allow-Origin' '*';
+    add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
+}
+```
 
-- 
GitLab