Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

agnos.is Forums

  1. Home
  2. Selfhosted
  3. Help fixing invalid origin with memos

Help fixing invalid origin with memos

Scheduled Pinned Locked Moved Selfhosted
selfhosted
8 Posts 3 Posters 0 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T This user is from outside of this forum
    T This user is from outside of this forum
    [email protected]
    wrote on last edited by
    #1

    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.

    C ? 2 Replies Last reply
    1
    0
    • System shared this topic on
    • T [email protected]

      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.

      C This user is from outside of this forum
      C This user is from outside of this forum
      [email protected]
      wrote on last edited by
      #2

      Stop exposing services like these to the Internet. If you need remote access, use a VPN.

      You don't need to own a domain either. Use a free dynamic DNS provider.

      And if you don't need remote access, don't bother with that at all. Just run a local DNS server with records for these services with anything under the .internal TLD. Or even just IP address.

      HTTPS can come later. It's really not important for traffic that's not sensitive, like no passwords or whatever.

      T ? 2 Replies Last reply
      0
      • C [email protected]

        Stop exposing services like these to the Internet. If you need remote access, use a VPN.

        You don't need to own a domain either. Use a free dynamic DNS provider.

        And if you don't need remote access, don't bother with that at all. Just run a local DNS server with records for these services with anything under the .internal TLD. Or even just IP address.

        HTTPS can come later. It's really not important for traffic that's not sensitive, like no passwords or whatever.

        T This user is from outside of this forum
        T This user is from outside of this forum
        [email protected]
        wrote on last edited by
        #3

        Definitely need remote access, and tunneling in every time I want to sync my notes app is way too much work. I've containerized these services as a security layer and you need user creds to access anything without an exploit. I'm comfortable with that level of risk.

        Dynamic DNS is a very cool thing I didn't know exists. I'll definitely look into it further! But for the time being I still need a fix for my problem.

        1 Reply Last reply
        0
        • T [email protected]

          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.

          ? Offline
          ? Offline
          Guest
          wrote on last edited by
          #4

          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.

          T 1 Reply Last reply
          0
          • C [email protected]

            Stop exposing services like these to the Internet. If you need remote access, use a VPN.

            You don't need to own a domain either. Use a free dynamic DNS provider.

            And if you don't need remote access, don't bother with that at all. Just run a local DNS server with records for these services with anything under the .internal TLD. Or even just IP address.

            HTTPS can come later. It's really not important for traffic that's not sensitive, like no passwords or whatever.

            ? Offline
            ? Offline
            Guest
            wrote on last edited by
            #5

            There's no reason not to expose those services to the Internet, they have authentication, and noone can access them without logging in first.
            There are actually reasons for exposing them, you can share a memo or a file to other people

            C 1 Reply Last reply
            0
            • ? Guest

              There's no reason not to expose those services to the Internet, they have authentication, and noone can access them without logging in first.
              There are actually reasons for exposing them, you can share a memo or a file to other people

              C This user is from outside of this forum
              C This user is from outside of this forum
              [email protected]
              wrote on last edited by
              #6

              You assume there is no vulnerability in the web server itself, or a vulnerability that allows bypassing authentication.

              1 Reply Last reply
              0
              • ? Guest

                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.

                T This user is from outside of this forum
                T This user is from outside of this forum
                [email protected]
                wrote on last edited by
                #7

                IP and port are what I put in my browser

                ? 1 Reply Last reply
                0
                • T [email protected]

                  IP and port are what I put in my browser

                  ? Offline
                  ? Offline
                  Guest
                  wrote on last edited by
                  #8

                  You may need to configure nginx to pass through some additional headers, I haven't used it in a while.

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

                  1 Reply Last reply
                  0
                  • System shared this topic on
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  • Login

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • World
                  • Users
                  • Groups