Add delete tunnel endpoint
#151
@@ -1,39 +0,0 @@
|
||||
server {
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
server_name a8c-localtunnel.cyou *.a8c-localtunnel.cyou;
|
||||
return 301 https://$host$request_uri;
|
||||
}
|
||||
server {
|
||||
listen 443 ssl;
|
||||
server_name a8c-localtunnel.cyou *.a8c-localtunnel.cyou;
|
||||
ssl_certificate /etc/letsencrypt/live/a8c-localtunnel.cyou/fullchain.pem;
|
||||
ssl_certificate_key /etc/letsencrypt/live/a8c-localtunnel.cyou/privkey.pem;
|
||||
include /etc/letsencrypt/options-ssl-nginx.conf;
|
||||
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
|
||||
|
||||
location / {
|
||||
proxy_set_header X-Forwarded-For $remote_addr;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_set_header Connection 'upgrade';
|
||||
# proxy_set_header Connection "";
|
||||
|
||||
proxy_set_header X-Forwarded-Proto https;
|
||||
|
||||
proxy_cache_bypass $http_upgrade;
|
||||
proxy_http_version 1.1;
|
||||
proxy_pass http://127.0.0.1:1234;
|
||||
|
||||
# Fix for "146656 upstream sent too big header while reading response header from upstream"
|
||||
# https://ma.ttias.be/nginx-proxy-upstream-sent-big-header-reading-response-header-upstream
|
||||
proxy_buffer_size 128k;
|
||||
proxy_buffers 4 256k;
|
||||
proxy_busy_buffers_size 256k;
|
||||
|
||||
# Ugly fix for Connection timed out error
|
||||
proxy_send_timeout 300;
|
||||
proxy_read_timeout 300;
|
||||
|
||||
}
|
||||
}
|
||||
+8
-4
@@ -71,8 +71,10 @@ class Client extends EventEmitter {
|
||||
res.writeHead(clientRes.statusCode, clientRes.headers);
|
||||
|
||||
// using pump is deliberate - see the pump docs for why
|
||||
pump(clientRes, res, function(err) {
|
||||
this.debug('> PIPE FINISHED, %s', err);
|
||||
pump(clientRes, res, (err) => {
|
||||
if (err) {
|
||||
this.debug('> PIPE ERROR, %s', err);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
@@ -86,8 +88,10 @@ class Client extends EventEmitter {
|
||||
});
|
||||
|
||||
// using pump is deliberate - see the pump docs for why
|
||||
pump(req, clientReq, function(err) {
|
||||
this.debug('< PIPE FINISHED, %s', err);
|
||||
pump(req, clientReq, (err) => {
|
||||
if (err) {
|
||||
this.debug('< PIPE ERROR, %s', err);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user