CORS issue with PouchDB and Couch Sync Gateway

Hi @andy and all,

Apologies for not replying earlier and posting the config file. I believe I have resolved this, at least for now. The main reason that the cors message was appearing is because I was either listening before I was syncing or stopping syncing before I stopped listening. So the PouchDB side was listening but wasn’t syncing to couch-sync-gateway yet.

The problem where I said that I couldn’t get it to work when trying to add user login is because I wasn’t specifying “admin_channels = [*]” when specifying a user. This was in the setup for the guest user which is why it was working before I tried to add authentication. When it wasn’t syncing properly (due to the channels, or because I wasn’t authenticating the user properly) I was also sometimes getting the CORS error.

Both of these issues have been bugging me for a few days so Im glad I’ve finally got to the bottom of them.

Thanks,
Giles