From ce8d52021e08d3dc3ddcae2206f909826f172cf4 Mon Sep 17 00:00:00 2001 From: Nath1416 Date: Wed, 8 Mar 2023 11:05:10 -0500 Subject: [PATCH] Ajout link script, robots.txt --- src/create-link/link-compose-snippet.yml | 4 ++++ src/gateway/Dockerfile | 2 ++ src/gateway/http.conf.template | 4 ++++ src/gateway/robots.txt | 2 ++ 4 files changed, 12 insertions(+) create mode 100644 src/gateway/robots.txt diff --git a/src/create-link/link-compose-snippet.yml b/src/create-link/link-compose-snippet.yml index 4f29fdf..8b7bffb 100644 --- a/src/create-link/link-compose-snippet.yml +++ b/src/create-link/link-compose-snippet.yml @@ -3,8 +3,12 @@ environment: LINK_DOMAIN: ${LINK_DOMAIN} EXPOSE: ${EXPOSE} + EXPOSE_HTTPS: ${EXPOSE_HTTPS} + FORWARD_ONLY: "True" GATEWAY_CLIENT_WG_PRIVKEY: ${WG_PRIVKEY} GATEWAY_LINK_WG_PUBKEY: ${GATEWAY_LINK_WG_PUBKEY} GATEWAY_ENDPOINT: ${GATEWAY_ENDPOINT} + networks: + - internal cap_add: - NET_ADMIN diff --git a/src/gateway/Dockerfile b/src/gateway/Dockerfile index 6c83275..daf98ec 100644 --- a/src/gateway/Dockerfile +++ b/src/gateway/Dockerfile @@ -4,3 +4,5 @@ FROM nginx ADD http.conf.template /etc/nginx/templates/http.conf.template # Dynamic HTTPS(SNI) ADD nginx.conf.template /etc/nginx/templates/nginx.conf.template +# Add robots.txt file +ADD robots.txt /home/robots.txt diff --git a/src/gateway/http.conf.template b/src/gateway/http.conf.template index 3d5c7e2..a2e06bb 100644 --- a/src/gateway/http.conf.template +++ b/src/gateway/http.conf.template @@ -26,6 +26,10 @@ server { proxy_set_header Host $host; proxy_set_header X-Forwarded-For $remote_addr; } + location /robots.txt { + root /home/; + try_files /robots.txt =404; + } #error_page 404 /404.html; diff --git a/src/gateway/robots.txt b/src/gateway/robots.txt new file mode 100644 index 0000000..c2a49f4 --- /dev/null +++ b/src/gateway/robots.txt @@ -0,0 +1,2 @@ +User-agent: * +Allow: /