location / { include header.conf; if ($http_user_agent ~* "^Wget") { proxy_pass http://contexts; break; } return 302 https://$server_name/; }