CatgirlIntelligenceAgency/run/nginx-site.conf

38 lines
1009 B
Plaintext
Raw Normal View History

2023-03-04 14:00:46 +01:00
server {
listen 80;
listen [::]:80;
server_name nginx;
proxy_set_header X-Context $remote_addr-$connection;
proxy_set_header X-Extern-Url $scheme://$host$request_uri;
proxy_set_header X-Extern-Domain $scheme://$host;
proxy_set_header X-User-Agent $http_user_agent;
proxy_set_header X-Public "1";
rewrite ^/shuffle/$ /search?query=browse:random&profile=yolo;
rewrite ^/explore/(.*)$ /search?query=browse:$1&profile=yolo;
rewrite ^/links/(.*)$ /search?query=links:$1&profile=corpo;
location /screenshot {
proxy_pass http://assistant-service:5025/public$uri;
}
location /site-search {
proxy_pass http://search-service:5023/public/site-search;
}
location /site/suggest {
proxy_pass http://search-service:5023/public/site/suggest;
}
location /site/flag-site {
proxy_pass http://search-service:5023/public/site/flag-site;
}
location /site/ {
rewrite ^/site/(.*)$ /search?query=site:$1&profile=yolo;
}
location / {
proxy_pass http://search-service:5023/public/;
}
}