mirror of
https://github.com/replicatedhq/ttl.sh.git
synced 2026-02-14 16:59:51 +00:00
@@ -5,8 +5,3 @@ COPY nginx.conf /etc/nginx/nginx.conf
|
||||
COPY src/favicon.ico /usr/share/nginx/html/
|
||||
COPY src/index.htm /usr/share/nginx/html/
|
||||
COPY src/ttlsh_files /usr/share/nginx/html/ttlsh_files/
|
||||
|
||||
ADD entrypoint.sh /entrypoint.sh
|
||||
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
CMD ["nginx", "-g", "daemon off;"]
|
||||
@@ -1,7 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
sed -i "s/__PORT__/$PORT/g" /etc/nginx/nginx.conf
|
||||
|
||||
exec "$@"
|
||||
@@ -3,9 +3,16 @@ http {
|
||||
include mime.types;
|
||||
default_type application/octet-stream;
|
||||
|
||||
proxy_ssl_server_name on;
|
||||
resolver 8.8.8.8;
|
||||
|
||||
upstream upstream_ttlsh {
|
||||
server ttlsh.herokuapp.com:443;
|
||||
}
|
||||
|
||||
server {
|
||||
listen __PORT__;
|
||||
server_name router.ttl.sh;
|
||||
listen <%= ENV["PORT"] %>;
|
||||
server_name _;
|
||||
|
||||
location / {
|
||||
root /usr/share/nginx/html;
|
||||
@@ -18,15 +25,13 @@ http {
|
||||
|
||||
location /v2 {
|
||||
client_max_body_size 10000m;
|
||||
|
||||
proxy_pass https://ttl.sh;
|
||||
proxy_http_version 1.1;
|
||||
proxy_request_buffering off;
|
||||
proxy_intercept_errors on;
|
||||
proxy_set_header Host $host;
|
||||
set $upstream upstream_ttlsh;
|
||||
proxy_pass https://$upstream;
|
||||
proxy_ssl_name ttlsh.herokuapp.com;
|
||||
proxy_set_header x-forwarded-host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_set_header Host ttlsh.herokuapp.com;
|
||||
proxy_request_buffering off;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user