viernes, 8 de septiembre de 2017

Google Analytics from the command line

Use the following command
curl -d "v=1&tid=UA-104039318-1&cid=111&t=pageView&dp=/b/route&ds=web&cd3=GDL-MEX" 
-X POST www.google-analytics.com/collect

How to perform Single sign-on with Nginx

Insert within server section:
 location = /auth {
            internal;
            proxy_pass              http://localhost:8080/auth.jsp;
            proxy_pass_request_body off;
            proxy_set_header        Content-Length "";
            proxy_set_header        X-Original-URI $request_uri;
        }

        location /examples/ {
            auth_request     /auth;
            auth_request_set $userid $upstream_http_userid;
            auth_request_set $role $upstream_http_role;
            proxy_set_header X-UserId $userid;
            proxy_set_header X-Role $role;
            proxy_pass              http://localhost:8080/examples/;
        }