diff --git a/configs/fic-auth-fwd.conf b/configs/fic-auth-fwd.conf new file mode 100644 index 00000000..b3453f71 --- /dev/null +++ b/configs/fic-auth-fwd.conf @@ -0,0 +1,3 @@ +auth_request /auth; + +set $team "$remote_user"; diff --git a/configs/nginx-demo.conf b/configs/nginx-demo.conf index a281d3d4..cf6ecee4 100644 --- a/configs/nginx-demo.conf +++ b/configs/nginx-demo.conf @@ -29,6 +29,14 @@ server { location = / { include fic-auth.conf; } + location = /auth { + internal; + proxy_pass https://163.5.55.58/remote.php/webdav/; + proxy_pass_request_body off; + proxy_set_header Host "owncloud.srs.epita.fr"; + proxy_set_header Content-Length ""; + proxy_set_header X-Original-URI $request_uri; + } location = /index.html { include fic-auth.conf; } diff --git a/fickit-frontend.yml b/fickit-frontend.yml index d59acad7..b98f0533 100644 --- a/fickit-frontend.yml +++ b/fickit-frontend.yml @@ -235,7 +235,7 @@ files: source: configs/nginx-demo.conf mode: "0400" - path: etc/nginx/fic-auth.conf - source: configs/fic-auth-demo.conf + source: configs/fic-auth-fwd.conf mode: "0400" - path: www/htdocs-frontend