mirror of
https://gitlab.com/octospacc/Configs.git
synced 2025-03-12 16:50:26 +01:00
64 lines
3.3 KiB
Plaintext
64 lines
3.3 KiB
Plaintext
server {
|
|
listen 80;
|
|
listen 443 ssl;
|
|
server_name feeds.octt.eu.org feeds.spaccsoj3trhzowrrblzb5m6hgkwu6syghnmhett7gvxbrz5zhsrs4ad.onion;
|
|
ssl_certificate /etc/letsencrypt/live/feeds.octt.eu.org/fullchain.pem;
|
|
ssl_certificate_key /etc/letsencrypt/live/feeds.octt.eu.org/privkey.pem;
|
|
ssl_prefer_server_ciphers on;
|
|
|
|
#location / {
|
|
# proxy_http_version 1.1;
|
|
# proxy_pass http://localhost:8017;
|
|
# proxy_set_header X-Real-IP $remote_addr;
|
|
# 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 "upgrade";
|
|
# sub_filter '</body>' '<script> function ForceUpdateFeeds(){ var Count = 0; Array.from(document.querySelectorAll(atob("KltpZF49ImZfIl0uaXRlbS5mZWVk"))).forEach(function(El){ Count++; fetch(location.origin + "/i/?c=feed&a=actualize&id=" + El.id.split("_")[1]); }); setTimeout(function(){ location.reload(); }, Count * 4000); }; </script></body>';
|
|
# sub_filter '<a id="actualize"' '<a class="btn" href="#" title="Force update feeds" onclick="javascript:ForceUpdateFeeds();">Force update feeds</a><a id="actualize"';
|
|
# sub_filter_once on;
|
|
#}
|
|
|
|
root /Main/Server/www/FreshRSS/p;
|
|
index index.php index.html index.htm;
|
|
|
|
# nginx log files
|
|
access_log /var/log/nginx/FreshRSS.access.log;
|
|
error_log /var/log/nginx/FreshRSS.error.log;
|
|
|
|
# php files handling
|
|
# this regex is mandatory because of the API
|
|
location ~ ^.+?\.php(/.*)?$ {
|
|
fastcgi_pass php;
|
|
fastcgi_split_path_info ^(.+\.php)(/.*)$;
|
|
# By default, the variable PATH_INFO is not set under PHP-FPM
|
|
# But FreshRSS API greader.php need it. If you have a “Bad Request” error, double check this var!
|
|
# NOTE: the separate $path_info variable is required. For more details, see:
|
|
# https://trac.nginx.org/nginx/ticket/321
|
|
set $path_info $fastcgi_path_info;
|
|
fastcgi_param PATH_INFO $path_info;
|
|
include fastcgi_params;
|
|
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
|
sub_filter '</body>' '<link rel="stylesheet" href="/user.css"/><script src="/Res/User/FreshRSS/Tweaks.js"></script></body>';
|
|
sub_filter '<a id="actualize"' '<a class="btn" href="#" title="Force update feeds" onclick="javascript:ForceUpdateFeeds();">Force update feeds</a><a id="actualize"';
|
|
sub_filter_once on;
|
|
}
|
|
|
|
location /Res/User/FreshRSS/ {
|
|
proxy_pass http://127.0.0.1/Res/User/FreshRSS/;
|
|
proxy_set_header Host hlb0.octt.eu.org;
|
|
}
|
|
|
|
location /user.css {
|
|
add_header Content-Type text/css;
|
|
return 200 ".flux .item > a, .flux .flux_header .item { white-space: normal !important; } .state_unread .category:not(.active)[data-unread='0'], .state_unread .feed:not(.active)[data-unread='0'] { display: revert; }";
|
|
}
|
|
|
|
#location / {
|
|
# try_files $uri $uri/ index.php;
|
|
# sub_filter '</body>' '<style> .flux .item > a { white-space: normal; } </style><script> function ForceUpdateFeeds(){ var Count = 0; Array.from(document.querySelectorAll(atob("KltpZF49ImZfIl0uaXRlbS5mZWVk"))).forEach(function(El){ Count++; fetch(location.origin + "/i/?c=feed&a=actualize&id=" + El.id.split("_")[1]); }); setTimeout(function(){ location.reload(); }, Count * 4000); }; </script></body>';
|
|
# sub_filter '<a id="actualize"' '<a class="btn" href="#" title="Force update feeds" onclick="javascript:ForceUpdateFeeds();">Force update feeds</a><a id="actualize"';
|
|
# sub_filter_once on;
|
|
#}
|
|
}
|