Saint Michael
January 29, 2023 03:18PM
In my website, I proxied
https://perplexity.ai
trough a domain of mine
but when I get redirected, I see on top, on the domain line, not my own line.
In other cases, I see my own domain line.
What causes each case, i.e., what do I need to do so always the
https://domain.com is NOT the original domain being proxied, but my
own domain (https://disney.ibm.com).

in this case, this is the example:

server {
default_type application/octet-stream;
set $template_root /usr/local/openresty/nginx/html/templates;
listen 0.0.0:443 ssl;
# reuseport;
error_log logs/error.log warn;
access_log logs/access.log;
server_name disney.ibm.com;
ssl_certificate /etc/letsencrypt/live/disney.ibm.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/disney.ibm.com/privkey.pem;
location / {
proxy_cookie_domain https://perplexity.ai https://disney.ibm.com;
proxy_buffering on;
resolver 127.0.0.1 ipv6=off;
proxy_http_version 1.1;
proxy_buffer_size 128k;
proxy_busy_buffers_size 256k;
proxy_buffers 4 256k;
proxy_set_header User-Agent $http_user_agent;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $http_connection;
proxy_set_header Accept-Encoding "";
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Scheme $scheme;
proxy_ssl_server_name on;
proxy_ssl_name $proxy_host;
proxy_set_header Host perplexity.ai;
proxy_pass https://perplexity.ai;
proxy_redirect https://perplexity.ai https://disney.ibm.com;
subs_filter_types text/css text/javascript application/javascript;
subs_filter "https://cdn*.perplexity.ai/(.*)"
"https://disney.ibm.com/cdn*/$1" gi
subs_filter "https://perplexity.ai/(.*)" "https://disney.ibm.com/$1" gi;
subs_filter "https://(.*).perplexity.ai/(.*)" "https://disney.ibm.com/$1/$2" gi;
subs_filter "https://www.perplexity.ai" "https://disney.ibm.com" gi;
subs_filter "https://perplexity.ai" "https://disney.ibm.com" gi;
subs_filter "perplexity.ai" "disney.ibm.com" gi;
}
}
_______________________________________________
nginx mailing list
nginx@nginx.org
https://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Question about proxy

Saint Michael January 29, 2023 03:18PM

Re: Question about proxy

Francis Daly January 30, 2023 08:22PM

Re: Question about proxy

Saint Michael January 30, 2023 10:42PM

Re: Question about proxy

Francis Daly January 31, 2023 02:46AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 295
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready