This file contains hidden or 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 function gets cookie with a given name | |
| function getCookie(name) { | |
| var cookieValue = null; | |
| if (document.cookie && document.cookie != '') { | |
| var cookies = document.cookie.split(';'); | |
| for (var i = 0; i < cookies.length; i++) { | |
| var cookie = jQuery.trim(cookies[i]); | |
| // Does this cookie string begin with the name we want? | |
| if (cookie.substring(0, name.length + 1) == (name + '=')) { | |
| cookieValue = decodeURIComponent(cookie.substring(name.length + 1)); |
This file contains hidden or 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
| server { | |
| listen 80; | |
| listen 443 ssl; | |
| server_name ~^(?<user>[a-zA-Z0-9-]+)\.example\.com$; | |
| location / { | |
| resolver 8.8.8.8; | |
| rewrite ^([^.]*[^/])$ $1/ permanent; | |
| proxy_pass_header Set-Cookie; | |
| proxy_pass $scheme://example.com/user/$user$request_uri; |
NewerOlder