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 {
|
2023-03-08 18:36:41 +01:00
|
|
|
proxy_pass http://assistant-service:5025/public/screenshot;
|
2023-03-04 14:00:46 +01:00
|
|
|
}
|
|
|
|
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;
|
|
|
|
}
|
2023-03-22 15:11:22 +01:00
|
|
|
location /suggest/ {
|
|
|
|
proxy_pass http://assistant-service:5025/public$request_uri;
|
|
|
|
access_log off;
|
|
|
|
}
|
2023-03-04 14:00:46 +01:00
|
|
|
location / {
|
|
|
|
proxy_pass http://search-service:5023/public/;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|