I need help syncing PouchDB with Couchbase Sync Gateway.
I keep getting the following error that points to a CORS problem, but I've configured Couchbase Sync Gateway (CSG) for CORS according to their documentation.
XMLHttpRequest cannot load http://localhost:4985/test-database/.
No 'Access-Control-Allow-Origin'header is present on the requested
resource. Origin 'http://localhost:3000' is therefore not
allowed access.
I've tried the following config file per the CSG docs:
{
"log": ["HTTP+"],
"CORS": {
"origin":["http://localhost:3000"],
"loginOrigin":["http://localhost:3000"],
"headers":["Content-Type"],
"maxAge": 1728000
},
"databases": {
"test-database": {
"server": "walrus:",
"users": { "GUEST": {"disabled": false, "admin_channels": ["*"] } }
}
}
}
I've tried other config files as well from the Couchbase blog, but none of them work! Any help with this will be greatly appreciated!