Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

firefox sync server behind reverse proxy #299

Open
mlause opened this issue Apr 14, 2022 · 1 comment
Open

firefox sync server behind reverse proxy #299

mlause opened this issue Apr 14, 2022 · 1 comment

Comments

@mlause
Copy link

mlause commented Apr 14, 2022

I posted this on the mozilla forum, but hopefully I can get a faster response here.

I'm hosting this on unraid as a docker. If I set sync server up on the local network, it works. I use this public address in the docker container http://localhost:5000 and the about:config server as identity.sync.tokenserver.uri = http://localhost:5000/token/1.0/sync/1.5.

Now if I switch to my reverse proxy (swag), I use this public address in the docker container http://firefox.mydomain.com/ and the about:config server as identity.sync.tokenserver.uri = http://firefox.mydomain.com:5000/token/1.0/sync/1.5. It does not sync. I get an error if I use that url in the browser link. If I make it http://firefox.mydomain.com/token/1.0/sync/1.5 (taking out the port number), my browser displays a json page. But if I remove the port number in the about:config and make it identity.sync.tokenserver.uri = http://firefox.mydomain.com/token/1.0/sync/1.5, it logs me out of my firefox account. It says the account is disconnected requiring me to login. If I do, I get booted out again.

The reverse proxy is passing through port 5000, so that is why not specifying it returns a valid browser page. The about:config seems to need the port specified to work. Otherwise I'm getting logged off. Is there a workaround to this?

@meichthys
Copy link

It works for me using the url without the port number in the about:config and with the following docker compose:

version: '3.7'
services:
  syncserver:
    container_name: firefox_syncserver
    image: mozilla/syncserver:latest
    volumes:
      - data:/data
    ports:
      - 5000:5000
    environment:
      SYNCSERVER_PUBLIC_URL: 'https://firefoxsyncserver.mydomain.com'
      SYNCSERVER_SECRET: 'your secret here'
      SYNCSERVER_SQLURI: 'sqlite:////data/syncserver.db'
      SYNCSERVER_BATCH_UPLOAD_ENABLED: 'true'
      SYNCSERVER_FORCE_WSGI_ENVIRON: 'true'
      PORT: '5000'
    restart: always
    networks:
      - firefoxsyncserver
      
networks:
  firefoxsyncserver:
  
volumes:
  data:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants