forked from tagomoris/presto-client-node
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix following 301 redirects for https upgrades
- Loading branch information
1 parent
ff73c77
commit ede2030
Showing
7 changed files
with
136 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
events { | ||
worker_connections 1024; | ||
} | ||
|
||
http { | ||
server { | ||
listen 80; | ||
server_name _; | ||
return 301 https://localhost:443$request_uri; | ||
} | ||
|
||
server { | ||
listen 443 ssl; | ||
server_name _; | ||
|
||
ssl_certificate /etc/nginx/ssl/nginx-selfsigned.crt; | ||
ssl_certificate_key /etc/nginx/ssl/nginx-selfsigned.key; | ||
|
||
location / { | ||
proxy_pass http://presto:8080/; | ||
proxy_connect_timeout 3; | ||
|
||
proxy_set_header Host $http_host; | ||
proxy_set_header X-Real-IP $remote_addr; | ||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
# don't forward the protocol, so that presto will default to responding with | ||
# http:// URLs, to test the 301 redirect logic. | ||
# proxy_set_header X-Forwarded-Proto $scheme; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
-----BEGIN CERTIFICATE----- | ||
MIIDazCCAlOgAwIBAgIUYAwPnvz5X7oQWyF/FbHEDYhiliAwDQYJKoZIhvcNAQEL | ||
BQAwRTELMAkGA1UEBhMCQVUxEzARBgNVBAgMClNvbWUtU3RhdGUxITAfBgNVBAoM | ||
GEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZDAeFw0yMzExMjExNDA4MjVaFw0yNDEx | ||
MjAxNDA4MjVaMEUxCzAJBgNVBAYTAkFVMRMwEQYDVQQIDApTb21lLVN0YXRlMSEw | ||
HwYDVQQKDBhJbnRlcm5ldCBXaWRnaXRzIFB0eSBMdGQwggEiMA0GCSqGSIb3DQEB | ||
AQUAA4IBDwAwggEKAoIBAQCMWr++NX5Hpt6vnkMg2I72ja7PLTQo1f8sP12L2dOc | ||
sQbIpY4pMCcmpzh1mI+gH9pPSsxrcnoDiX+rMPMpu1VVREY95jOUWWKQ+8fosCtQ | ||
T0sZ5X6XoPd4MLqiaDZajh6xxMgTz4L08xPMi7wMpSwnZGPTbr3KDqVD1gdwaj3L | ||
YZZK1gfOYpt9XErZ+EePI0uCxRNyrkB+X3t2dJVRVQzWt23fFtsOVBW94kbG+Swh | ||
7VO8UCJ56EJpC6767CdqNdQs119+yiVjabG3xA2PPczJIsLRcb4nZO25oNiDh3Lw | ||
rfrxYoBvM6JN/IXuf4E3+nUMuwrzVsx6d1aPGZBm7qALAgMBAAGjUzBRMB0GA1Ud | ||
DgQWBBRKe9ovcw7I2WQ/kz5CP3m9W1qxGjAfBgNVHSMEGDAWgBRKe9ovcw7I2WQ/ | ||
kz5CP3m9W1qxGjAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQAx | ||
2Svbu20Fx1HLPrbpDzlAHpI0Pnw5zzeEoIc/XIZ2tLa13vuFiUyT18kbPPmnI8Zh | ||
cdPhNGgNxfa7VNM1/lGbfSnPBKR6uJcgXKO+olWHZkaRYjeJh/JpsobOn7L3hNpA | ||
ygNioc0oiffkGOznATkYmq6HeV8OQ5H7/Z4wu1VhZBDNjkSPPy+xdvM/k/eLuzvU | ||
dpErzxd2GRsv/tVVEryvNTcgJB+cm/WSXd6AgLQtKLcIZCO20cqAP78G25KA7qAl | ||
iBSH+pXJk1snl8PE9jmn+4uj+9axsCEpvIMlVCBnTxjgSfVvvimGdnPyrWamIN/9 | ||
CyW2rVZFarM0UVQ+BMw8 | ||
-----END CERTIFICATE----- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
-----BEGIN PRIVATE KEY----- | ||
MIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQCMWr++NX5Hpt6v | ||
nkMg2I72ja7PLTQo1f8sP12L2dOcsQbIpY4pMCcmpzh1mI+gH9pPSsxrcnoDiX+r | ||
MPMpu1VVREY95jOUWWKQ+8fosCtQT0sZ5X6XoPd4MLqiaDZajh6xxMgTz4L08xPM | ||
i7wMpSwnZGPTbr3KDqVD1gdwaj3LYZZK1gfOYpt9XErZ+EePI0uCxRNyrkB+X3t2 | ||
dJVRVQzWt23fFtsOVBW94kbG+Swh7VO8UCJ56EJpC6767CdqNdQs119+yiVjabG3 | ||
xA2PPczJIsLRcb4nZO25oNiDh3LwrfrxYoBvM6JN/IXuf4E3+nUMuwrzVsx6d1aP | ||
GZBm7qALAgMBAAECggEAAuaD3Iq/H6dGJiZEyDKmzwI3NkF+jh17Vs8UatBx5roN | ||
ztWvrhA4WZHOa+Je4ss7DV/EAQXDmbvHWff6qRvISVPOM8yZt5tv8FkTqi5XJs4M | ||
r5imLhH91eED6llG+PDDl57ebPJhMsNXNGdALUQN496COvColrqzavHLA5A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