Running joplin and memos in docker, routed through nginx. Since I don’t own a domain I’m just using my public ip with ports and port forwarding. Joplin was throwing the same invalid origin error, but worked after I set APP_BASE_URL: http://<IP>:<port>. I tried setting SITE_URL=http://<IP>:<port2> under environment, which I’ve read is supposed to fix this exact problem. Same error. The error displays the correct address including port number, so I know that’s being passed correctly. I’ve tried several different variations of the Host, Origin, and Referer header without success. Just for fun I tried directly exposing <port2> on the memos instance and it opened right up in the browser.

PS: Yes, I know I should be using https. I’m lazy. Setting up a cert is on the old todo list.

  • silenium_dev@feddit.org
    link
    fedilink
    English
    arrow-up
    1
    ·
    4 days ago

    If you’re exposing memos through nginx, the SITE_URL needs to be the public url where nginx exposed memos (so exactly the same as you enter in your browser), not the Public-IP and the internal port of memos.

      • silenium_dev@feddit.org
        link
        fedilink
        English
        arrow-up
        1
        ·
        edit-2
        16 hours ago

        You may need to configure nginx to pass through some additional headers, I haven’t used it in a while. It could also be that memos refuses IP addresses as SITE_URL, and needs a proper domain name.

        I’m using traefik (on kubernetes) as reverse proxy, and I don’t even set SITE_URL, but it still works.