aboutsummaryrefslogtreecommitdiff
path: root/doc/book/src/cookbook/reverse_proxy.md
diff options
context:
space:
mode:
Diffstat (limited to 'doc/book/src/cookbook/reverse_proxy.md')
-rw-r--r--doc/book/src/cookbook/reverse_proxy.md38
1 files changed, 38 insertions, 0 deletions
diff --git a/doc/book/src/cookbook/reverse_proxy.md b/doc/book/src/cookbook/reverse_proxy.md
index 658f8421..b4674852 100644
--- a/doc/book/src/cookbook/reverse_proxy.md
+++ b/doc/book/src/cookbook/reverse_proxy.md
@@ -1 +1,39 @@
# Configuring a reverse proxy
+
+## Nginx
+
+```nginx
+server {
+ # In production you should use TLS instead of plain HTTP
+ listen [::]:80;
+
+ # We
+ server_name *.web.garage
+ example.com
+ my-site.tld
+ ;
+
+ location / {
+ add_header Access-Control-Allow-Origin *;
+ add_header Access-Control-Max-Age 3600;
+ add_header Access-Control-Expose-Headers Content-Length;
+ add_header Access-Control-Allow-Headers Range;
+
+ # We do not forward OPTIONS requests to Garage
+ # as it does not support them but they are needed for CORS.
+ if ($request_method = OPTIONS) {
+ return 200;
+ }
+
+ # If your do not have a Garage instance on the reverse proxy, change the URL here.
+ proxy_pass http://127.0.0.1:3902;
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+ proxy_set_header Host $host;
+ }
+}
+```
+
+
+## Apache httpd
+
+## Traefik