I want to hide the google spreadsheets target link using proxy_pass, and only allow access to my domain from specific IPs.
I would also like to hide the full link path for example instead of https://mydomain/spreadsheets/d/1Uv4qm0kps******XkXnTJMLNeqJmgM/edit?usp=sharing
https://mydomain/file1/
I’ve tried different options, here’s one of them:
location /spreadsheets {
proxy_ssl_server_name on;
proxy_ssl_name "docs.google.com";
proxy_set_header Referer "https://docs.google.com/";
proxy_pass https://docs.google.com;
proxy_redirect https://docs.google.com https://$host:$server_port;
proxy_set_header Accept-Encoding "";
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
sub_filter_once off;
sub_filter 'https://$proxy_host' 'https://$host:$server_port';
}