{"action":"created","issue":{"url":"https://api.github.com/repos/UKHomeOffice/docker-ngx-openresty/issues/9","labels_url":"https://api.github.com/repos/UKHomeOffice/docker-ngx-openresty/issues/9/labels{/name}","comments_url":"https://api.github.com/repos/UKHomeOffice/docker-ngx-openresty/issues/9/comments","events_url":"https://api.github.com/repos/UKHomeOffice/docker-ngx-openresty/issues/9/events","html_url":"https://github.com/UKHomeOffice/docker-ngx-openresty/pull/9","id":109780124,"number":9,"title":"Working optional UUID and removal of NAXSI","user":{"login":"lewismarshall","id":2500933,"avatar_url":"https://avatars.githubusercontent.com/u/2500933?v=3","gravatar_id":"","url":"https://api.github.com/users/lewismarshall","html_url":"https://github.com/lewismarshall","followers_url":"https://api.github.com/users/lewismarshall/followers","following_url":"https://api.github.com/users/lewismarshall/following{/other_user}","gists_url":"https://api.github.com/users/lewismarshall/gists{/gist_id}","starred_url":"https://api.github.com/users/lewismarshall/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lewismarshall/subscriptions","organizations_url":"https://api.github.com/users/lewismarshall/orgs","repos_url":"https://api.github.com/users/lewismarshall/repos","events_url":"https://api.github.com/users/lewismarshall/events{/privacy}","received_events_url":"https://api.github.com/users/lewismarshall/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-10-05T11:50:02Z","updated_at":"2015-10-05T11:51:28Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/UKHomeOffice/docker-ngx-openresty/pulls/9","html_url":"https://github.com/UKHomeOffice/docker-ngx-openresty/pull/9","diff_url":"https://github.com/UKHomeOffice/docker-ngx-openresty/pull/9.diff","patch_url":"https://github.com/UKHomeOffice/docker-ngx-openresty/pull/9.patch"},"body":"All tested locally with docker... @allandegnan @PurpleBooth @jon-shanks \r\n\r\n```\r\nLEWISs-MacBook-More-Pro:docker-ngx-openresty lewis$ docker run --name nginx_thing --rm=true -e 'PROXY_SERVICE_HOST=google.com' -e 'PROXY_SERVICE_PORT=80' -p 8443:443 -e 'ENABLE_UUID_PARAM=FALSE' nginx &\r\n[1] 5126\r\nLEWISs-MacBook-More-Pro:docker-ngx-openresty lewis$ Looking up google.com\r\nProxying to : http://216.58.208.78:80\r\nAuto UUID request parameter disabled.\r\nCore NAXSI rules enabled @ /usr/local/openresty/naxsi/naxsi_core.rules\r\nCore NAXSI location rules enabled @ /usr/local/openresty/naxsi/location/location.rules\r\nNo $LOAD_BALANCER_CIDR set, using straight SSL (client ip will be from loadbalancer if used)...\r\n2015/10/05 11:39:57 [notice] 18#0: using the \"epoll\" event method\r\n2015/10/05 11:39:57 [notice] 18#0: openresty/1.7.10.1\r\n2015/10/05 11:39:57 [notice] 18#0: built by gcc 4.8.3 20140911 (Red Hat 4.8.3-9) (GCC)\r\n2015/10/05 11:39:57 [notice] 18#0: OS: Linux 4.0.9-boot2docker\r\n2015/10/05 11:39:57 [notice] 18#0: getrlimit(RLIMIT_NOFILE): 1048576:1048576\r\n2015/10/05 11:39:57 [notice] 18#0: start worker processes\r\n2015/10/05 11:39:57 [notice] 18#0: start worker process 19\r\n\r\nLEWISs-MacBook-More-Pro:docker-ngx-openresty lewis$ curl -v --insecure https://192.168.99.100:8443/\r\n*   Trying 192.168.99.100...\r\n* Connected to 192.168.99.100 (192.168.99.100) port 8443 (#0)\r\n* TLS 1.2 connection using TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384\r\n* Server certificate: test\r\n> GET / HTTP/1.1\r\n> Host: 192.168.99.100:8443\r\n> User-Agent: curl/7.43.0\r\n> Accept: */*\r\n>\r\n< HTTP/1.1 301 Moved Permanently\r\n< Server: openresty/1.7.10.1\r\n< Date: Mon, 05 Oct 2015 11:40:07 GMT\r\n< Content-Type: text/html; charset=UTF-8\r\n< Content-Length: 223\r\n< Connection: keep-alive\r\n< Location: http://www.google.com:443/\r\n< Expires: Wed, 04 Nov 2015 11:40:07 GMT\r\n< Cache-Control: public, max-age=2592000\r\n< X-XSS-Protection: 1; mode=block\r\n< X-Frame-Options: SAMEORIGIN\r\n<\r\n<HTML><HEAD><meta http-equiv=\"content-type\" content=\"text/html;charset=utf-8\">\r\n<TITLE>301 Moved</TITLE></HEAD><BODY>\r\n<H1>301 Moved</H1>\r\nThe document has moved\r\n<A HREF=\"http://www.google.com:443/\">here</A>.\r\n</BODY></HTML>\r\n* Connection #0 to host 192.168.99.100 left intact\r\n192.168.99.1 - - [05/Oct/2015:11:40:07 +0000] \"GET / HTTP/1.1\" 301 587 \"-\" \"curl/7.43.0\" \"-\"\r\n2015/10/05 11:40:07 [info] 19#0: *1 client 192.168.99.1 closed keepalive connection\r\nLEWISs-MacBook-More-Pro:docker-ngx-openresty lewis$ docker stop nginx_thing\r\n\r\nnginx_thing\r\nLEWISs-MacBook-More-Pro:docker-ngx-openresty lewis$\r\nLEWISs-MacBook-More-Pro:docker-ngx-openresty lewis$ docker run --name nginx_thing --rm=true -e 'PROXY_SERVICE_HOST=google.com' -e 'PROXY_SERVICE_PORT=80' -p 8443:443  nginx &[2] 5130\r\n[1]   Exit 137                docker run --name nginx_thing --rm=true -e 'PROXY_SERVICE_HOST=google.com' -e 'PROXY_SERVICE_PORT=80' -p 8443:443 -e 'ENABLE_UUID_PARAM=FALSE' nginx\r\nLEWISs-MacBook-More-Pro:docker-ngx-openresty lewis$ Looking up google.com\r\nProxying to : http://216.58.208.78:80\r\nAuto UUID request parameter enabled.\r\nCore NAXSI rules enabled @ /usr/local/openresty/naxsi/naxsi_core.rules\r\nCore NAXSI location rules enabled @ /usr/local/openresty/naxsi/location/location.rules\r\nNo $LOAD_BALANCER_CIDR set, using straight SSL (client ip will be from loadbalancer if used)...\r\n2015/10/05 11:40:37 [notice] 18#0: using the \"epoll\" event method\r\n2015/10/05 11:40:37 [notice] 18#0: openresty/1.7.10.1\r\n2015/10/05 11:40:37 [notice] 18#0: built by gcc 4.8.3 20140911 (Red Hat 4.8.3-9) (GCC)\r\n2015/10/05 11:40:37 [notice] 18#0: OS: Linux 4.0.9-boot2docker\r\n2015/10/05 11:40:37 [notice] 18#0: getrlimit(RLIMIT_NOFILE): 1048576:1048576\r\n2015/10/05 11:40:37 [notice] 18#0: start worker processes\r\n2015/10/05 11:40:37 [notice] 18#0: start worker process 19\r\n\r\nLEWISs-MacBook-More-Pro:docker-ngx-openresty lewis$ curl -v --insecure https://192.168.99.100:8443/\r\n*   Trying 192.168.99.100...\r\n* Connected to 192.168.99.100 (192.168.99.100) port 8443 (#0)\r\n* TLS 1.2 connection using TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384\r\n* Server certificate: test\r\n> GET / HTTP/1.1\r\n> Host: 192.168.99.100:8443\r\n> User-Agent: curl/7.43.0\r\n> Accept: */*\r\n>\r\n< HTTP/1.1 301 Moved Permanently\r\n< Server: openresty/1.7.10.1\r\n< Date: Mon, 05 Oct 2015 11:40:42 GMT\r\n< Content-Type: text/html; charset=UTF-8\r\n< Content-Length: 268\r\n< Connection: keep-alive\r\n< Location: http://www.google.com:443/?nginxId=cb2190fd-f6e7-4fb2-cf10-b12e32a25bf0\r\n< Expires: Wed, 04 Nov 2015 11:40:42 GMT\r\n< Cache-Control: public, max-age=2592000\r\n< X-XSS-Protection: 1; mode=block\r\n< X-Frame-Options: SAMEORIGIN\r\n<\r\n<HTML><HEAD><meta http-equiv=\"content-type\" content=\"text/html;charset=utf-8\">\r\n<TITLE>301 Moved</TITLE></HEAD><BODY>\r\n<H1>301 Moved</H1>\r\nThe document has moved\r\n<A HREF=\"http://www.google.com:443/?nginxId=cb2190fd-f6e7-4fb2-cf10-b12e32a25bf0\">here</A>.\r\n</BODY></HTML>\r\n* Connection #0 to host 192.168.99.100 left intact\r\n192.168.99.1 - - [05/Oct/2015:11:40:42 +0000] \"GET / HTTP/1.1\" nginxId=cb2190fd-f6e7-4fb2-cf10-b12e32a25bf0 301 677 \"-\" \"curl/7.43.0\" \"-\"\r\n2015/10/05 11:40:42 [info] 19#0: *1 client 192.168.99.1 closed keepalive connection\r\nLEWISs-MacBook-More-Pro:docker-ngx-openresty lewis$ docker stop nginx_thing\r\nnginx_thing\r\nLEWISs-MacBook-More-Pro:docker-ngx-openresty lewis$ docker run --name nginx_thing --rm=true -e 'PROXY_SERVICE_HOST=google.com' -e 'PROXY_SERVICE_PORT=80' -p 8443:443 -e 'NAXSI_USE_DEFAULT_RULES=FALSE' nginx &\r\n[3] 5139\r\n[2]   Exit 137                docker run --name nginx_thing --rm=true -e 'PROXY_SERVICE_HOST=google.com' -e 'PROXY_SERVICE_PORT=80' -p 8443:443 nginx\r\nLEWISs-MacBook-More-Pro:docker-ngx-openresty lewis$ Looking up google.com\r\nProxying to : http://216.58.208.78:80\r\nAuto UUID request parameter enabled.\r\nDeleting core rules...\r\nNo $LOAD_BALANCER_CIDR set, using straight SSL (client ip will be from loadbalancer if used)...\r\n2015/10/05 11:42:40 [notice] 20#0: using the \"epoll\" event method\r\n2015/10/05 11:42:40 [notice] 20#0: openresty/1.7.10.1\r\n2015/10/05 11:42:40 [notice] 20#0: built by gcc 4.8.3 20140911 (Red Hat 4.8.3-9) (GCC)\r\n2015/10/05 11:42:40 [notice] 20#0: OS: Linux 4.0.9-boot2docker\r\n2015/10/05 11:42:40 [notice] 20#0: getrlimit(RLIMIT_NOFILE): 1048576:1048576\r\n2015/10/05 11:42:40 [notice] 20#0: start worker processes\r\n2015/10/05 11:42:40 [notice] 20#0: start worker process 21\r\n\r\nLEWISs-MacBook-More-Pro:docker-ngx-openresty lewis$ curl -v --insecure https://192.168.99.100:8443/\r\n*   Trying 192.168.99.100...\r\n* Connected to 192.168.99.100 (192.168.99.100) port 8443 (#0)\r\n* TLS 1.2 connection using TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384\r\n* Server certificate: test\r\n> GET / HTTP/1.1\r\n> Host: 192.168.99.100:8443\r\n> User-Agent: curl/7.43.0\r\n> Accept: */*\r\n>\r\n< HTTP/1.1 301 Moved Permanently\r\n< Server: openresty/1.7.10.1\r\n< Date: Mon, 05 Oct 2015 11:42:45 GMT\r\n< Content-Type: text/html; charset=UTF-8\r\n< Content-Length: 268\r\n< Connection: keep-alive\r\n< Location: http://www.google.com:443/?nginxId=58164dea-14a4-4beb-cb49-485421b7a17c\r\n< Expires: Wed, 04 Nov 2015 11:42:45 GMT\r\n< Cache-Control: public, max-age=2592000\r\n< X-XSS-Protection: 1; mode=block\r\n< X-Frame-Options: SAMEORIGIN\r\n<\r\n<HTML><HEAD><meta http-equiv=\"content-type\" content=\"text/html;charset=utf-8\">\r\n<TITLE>301 Moved</TITLE></HEAD><BODY>\r\n<H1>301 Moved</H1>\r\nThe document has moved\r\n<A HREF=\"http://www.google.com:443/?nginxId=58164dea-14a4-4beb-cb49-485421b7a17c\">here</A>.\r\n</BODY></HTML>\r\n* Connection #0 to host 192.168.99.100 left intact\r\n192.168.99.1 - - [05/Oct/2015:11:42:45 +0000] \"GET / HTTP/1.1\" nginxId=58164dea-14a4-4beb-cb49-485421b7a17c 301 677 \"-\" \"curl/7.43.0\" \"-\"\r\n2015/10/05 11:42:45 [info] 21#0: *1 client 192.168.99.1 closed keepalive connection\r\n(reverse-i-search)`exec': kubectl exec -it checking-proxy-v10-08v06 cat /etc/keys/crt\r\nLEWISs-MacBook-More-Pro:docker-ngx-openresty lewis$ docker exec -it nginx_thing bash\r\n[root@a9d97ac08864 openresty]# ls naxsi/\r\nlocation\r\n[root@a9d97ac08864 openresty]# ls naxsi/location/\r\n[root@a9d97ac08864 openresty]# exit\r\nLEWISs-MacBook-More-Pro:docker-ngx-openresty lewis$ docker stop nginx_thing\r\nnginx_thing\r\nLEWISs-MacBook-More-Pro:docker-ngx-openresty lewis$ docker run --name nginx_thing --rm=true -e 'PROXY_SERVICE_HOST=google.com' -e 'PROXY_SERVICE_PORT=80' -p 8443:443  nginx &[4] 5146\r\n[3]   Exit 137\r\n```"},"comment":{"url":"https://api.github.com/repos/UKHomeOffice/docker-ngx-openresty/issues/comments/145504462","html_url":"https://github.com/UKHomeOffice/docker-ngx-openresty/pull/9#issuecomment-145504462","issue_url":"https://api.github.com/repos/UKHomeOffice/docker-ngx-openresty/issues/9","id":145504462,"user":{"login":"allandegnan","id":1626873,"avatar_url":"https://avatars.githubusercontent.com/u/1626873?v=3","gravatar_id":"","url":"https://api.github.com/users/allandegnan","html_url":"https://github.com/allandegnan","followers_url":"https://api.github.com/users/allandegnan/followers","following_url":"https://api.github.com/users/allandegnan/following{/other_user}","gists_url":"https://api.github.com/users/allandegnan/gists{/gist_id}","starred_url":"https://api.github.com/users/allandegnan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/allandegnan/subscriptions","organizations_url":"https://api.github.com/users/allandegnan/orgs","repos_url":"https://api.github.com/users/allandegnan/repos","events_url":"https://api.github.com/users/allandegnan/events{/privacy}","received_events_url":"https://api.github.com/users/allandegnan/received_events","type":"User","site_admin":false},"created_at":"2015-10-05T11:51:28Z","updated_at":"2015-10-05T11:51:28Z","body":"LGTM"}}