OLD | NEW |
| (Empty) |
1 function get_host_info() { | |
2 const HTTP_PORT = '{{ports[http][0]}}'; | |
3 const HTTPS_PORT = '{{ports[https][0]}}'; | |
4 const ORIGINAL_HOST = '{{host}}'; | |
5 const REMOTE_HOST = '{{domains[www1]}}'; | |
6 const OTHER_HOST = '{{domains[www2]}}'; | |
7 return { | |
8 HTTP_ORIGIN: 'http://' + ORIGINAL_HOST + ':' + HTTP_PORT, | |
9 HTTPS_ORIGIN: 'https://' + ORIGINAL_HOST + ':' + HTTPS_PORT, | |
10 HTTPS_ORIGIN_WITH_CREDS: 'https://foo:bar@' + ORIGINAL_HOST + ':' + HTTPS_PO
RT, | |
11 HTTP_REMOTE_ORIGIN: 'http://' + REMOTE_HOST + ':' + HTTP_PORT, | |
12 HTTPS_REMOTE_ORIGIN: 'https://' + REMOTE_HOST + ':' + HTTPS_PORT, | |
13 HTTPS_REMOTE_ORIGIN_WITH_CREDS: 'https://foo:bar@' + REMOTE_HOST + ':' + HTT
PS_PORT, | |
14 UNAUTHENTICATED_ORIGIN: 'http://' + OTHER_HOST + ':' + HTTP_PORT, | |
15 AUTHENTICATED_ORIGIN: 'https://' + OTHER_HOST + ':' + HTTPS_PORT | |
16 }; | |
17 } | |
OLD | NEW |