Answer the question
In order to leave comments, you need to log in
How to remove "?" at the end of url?
I have a website (django + gunicorn + nginx) that I'm making for myself.
When opening any of the internal sites, a "?" sign is added to the end of the url.
How to remove it?
If I understand correctly, NGINX appends it. Tried to remove "?" adding to /etc/nginx/sites-available/default:
rewrite ^/(.*)/$ /$1 permanent;
server {
listen 81 default_server;
listen [::]:81 default_server;
root /var/www/html;
index index.html index.htm index.nginx-debian.html;
location /static {
alias /home/gourii/webapp/LocalSite/showls/static;
}
server_name _;
location / {
proxy_pass http://127.0.0.1:8001;
proxy_set_header X-Forwarded-Host $server_name;
proxy_set_header X-Real-IP $remote_addr;
add_header P3P 'CP="ALL DSP COR PSAa PSDa OUR NOR ONL UNI COM NAV"';
add_header Access-Controll-Allow-Origin *;
}
}
server {
listen 82 default_server;
listen [::]:82 default_server;
root /var/www/html;
index index.html index.htm index.nginx-debian.html;
server_name _;
location / {
proxy_pass http://127.0.0.1:8002;
proxy_set_header X-Forwarded-Host $server_name;
proxy_set_header X-Real-IP $remote_addr;
add_header P3P 'CP="ALL DSP COR PSAa PSDa OUR NOR ONL UNI COM NAV"';
add_header Access-Controll-Allow-Origin *;
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question