Last active
May 18, 2017 20:03
-
-
Save 0xDing/428bc3c1c93ddc4fe8ea62a8413639f8 to your computer and use it in GitHub Desktop.
Revisions
-
Boris Ding revised this gist
Jan 18, 2017 . 1 changed file with 15 additions and 15 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,19 +1,19 @@ server { listen 443 http2 ssl; server_name analytics.example.com; location /ga_proxy { proxy_set_header X-real-ip $remote_addr; rewrite ^/ga_proxy/(.*)$ /$1?$args&uip=$remote_addr; proxy_pass http://www.google-analytics.com; break; } location /analytics.js { proxy_set_header X-real-ip $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Referer https://www.google-analytics.com; proxy_set_header Host www.google-analytics.com; proxy_pass https://www.google-analytics.com; proxy_set_header Accept-Encoding ""; subs_filter_types text/css text/xml text/javascript; subs_filter www.google-analytics.com analytics.example.com/ga_proxy; } } -
Boris Ding created this gist
Jan 18, 2017 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,19 @@ server { listen 443 http2 ssl; server_name analytics.example.com; location /ga_proxy { proxy_set_header X-real-ip $remote_addr; rewrite ^/ga_proxy/(.*)$ /$1?$args&uip=$remote_addr; proxy_pass http://www.google-analytics.com; break; } location /analytics.js { proxy_set_header X-real-ip $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Referer https://www.google-analytics.com; header_referer end proxy_set_header Host www.google-analytics.com; #header_host end proxy_pass https://www.google-analytics.com; #proxy_pass end proxy_set_header Accept-Encoding ""; subs_filter_types text/css text/xml text/javascript; #subs_filtert end subs_filter www.google-analytics.com analytics.example.com/ga_proxy; } }