pictuga / morss

Get full text RSS feeds
https://morss.it/
GNU Affero General Public License v3.0
593 stars 77 forks source link

errors when proxied to use subdirectory #96

Open katchy3132 opened 2 years ago

katchy3132 commented 2 years ago

I have morss running as a docker container behind nginx . I am able to get the main page without a problem. But when I put in a feed url the browser basically hangs - on Firefox I get "Error loading stylesheet: Parsing an XSLT stylesheet failed." and on Chrome the page stays blank (I cant even right click) I can see through curl that it is returning the feed data but the proxy seems to mess up its detection of how to return the data. When I run morss standalone without nginx and pass in the feed url I see the feed preview page without a problem.

what can I do to tweak the config ?

thanks.

nginx config :

location /rssmor/ {
                proxy_pass http://localhost:8000 ;
                rewrite ^/rssmor(/.*) $1 break;

          }

docker-compose:

version: '3'
services:
    morss:
        image: pictuga/morss
        container_name: morss
        restart: unless-stopped
        ports:
            - '8000:8000'
        environment:
            - MAX_ITEM=100
            - LIM_TIME=65
            - MAX_TIME=60
            - LIM_ITEM=100
            - TIMEOUT=60
            - IGNORE_SSL=1
            - DEBUG=1
            - CACHE=sqlite
katchy3132 commented 2 years ago

it turns out the page calls /sheet.xsl . Since I have this proxied to xxx.domain/rssmor i needed to hack the call to point to /rssmor/sheet.xsl

if ($http_referer ~ ^https?://xxx.domain/rssmor) {
            rewrite ^/sheet.xsl  /rssmor/sheet.xsl  break;
        }

the problem still remains that this doesnt work well as a subdirectory image If I adjust any of the paramaters above it incorrectly generates the url

If I want to switch to JSON and click the dropdown I get https://xxx.domain/:format=json:cors/rssmor/www.example.com/feed/ when it should be https://xxx.domain/rssmor/:format=json:cors/www.example.com/feed/

pictuga commented 1 year ago

Hi, indeed the (very basic) js code assumes the tool is at the root of the domain