stringer icon indicating copy to clipboard operation
stringer copied to clipboard

Logged out on subdomain

Open reykjalin opened this issue 4 years ago • 2 comments

I've set up Stringer using Caddy 2 and the example docker setup but for some reason I keep getting logged out when I try to do anything besides reading posts. The post doesn't get marked as read after I read it.

I'm hosting a static website on this server at example.com and want stringer to live at feeds.example.com. Whenever I visit feeds.example.com I'm prompted to login, which works. If I then try to add a feed I can open that part of stringer, type in the URL to the feed I want to add, click "add", and I'm redirected to the login page again. Once I've logged in again, the feed hasn't been added.

The same thing happens when trying to star a post, or do anything that requires sending a POST request to the backend, although that may be a slightly wrong assumption on my part. I'm prompted to log in again, without anything changing once I've logged back in.

Everything works fine when I visit http://example.com:8080, but I'd rather not do that since that doesn't use https and typing in the port every time is not ideal 🙂.

Caddyfile:

example.com {
	redir https://www.example.com{uri}
}

www.example.com {
	encode zstd gzip
	root <static_content_folder>                                                                                                              
	file_server
}

feeds.example.com {
	# Note that I changed docker to expose 8080
	reverse_proxy http://localhost:8080
}

My docker-compose.yml:

version: '2'
services:
  postgres:
    image: postgres:9.5-alpine
    restart: always
    volumes:
      - ~/stringer:/var/lib/postgresql/data
    environment:
      - POSTGRES_PASSWORD=<redacted>
      - POSTGRES_USER=<redacted>
      - POSTGRES_DB=stringer

  web:
    image: mdswanson/stringer
    depends_on:
      - postgres
    restart: always
    ports:
      - 8080:8080
    environment:
      - SECRET_TOKEN=<redacted>
      - PORT=8080
      - DATABASE_URL=postgres://<redacted>:<redacted>@postgres:5432/stringer

I really like Stringer so far, and would hate to have this be a reason to not use it. Please let me know if there's anything I can do to help with figuring out what's going on!

reykjalin avatar Apr 16 '20 02:04 reykjalin

If it helps I'm having exactly the same issue. I have an internal DNS and I have the subdomain rss.example.com. When I try to add a feed after signing in, I'm kicked back to the login screen.

When going to http://ip.address.goes.here:5000, I'm prompted to log in again (fair enough, different URI and it doesn't have the cookies stored). After I sign in I'm able to add a feed without being kicked back to the login screen.

Natfan avatar Sep 03 '20 10:09 Natfan

Same here

vitkabele avatar Jun 06 '21 19:06 vitkabele

@reykjalin @Natfan @vitkabele can any of you confirm if this is still an issue on the latest main?

mockdeep avatar Oct 15 '23 15:10 mockdeep

Closing for now. We've made a bunch of updates to both the docker image and the app, so this issue may be resolved. Please let us know if you're still running into issues.

mockdeep avatar Nov 10 '23 19:11 mockdeep