- {
- "interface":":4984",
- "adminInterface":":4985",
- "log":["CRUD, Access, Auth"],
- "logFilePath": "/opt/customer/Couchbase/cb-sync-gateway.log",
- "compressResponses": false,
- "CORS": {
- "origin":["*"],
- "loginOrigin":["*"],
- "headers":["Access-Control-Allow-Origin","DNT","X-CustomHeader","Keep-Alive","User-Agent","X-Requested-With","If-Modified-Since","Cache-Control","Content-Type"],
- "maxAge": 1728000
- },
- "databases": {
- "realize-reader": {
- "server":"http://localhost:8091",
- "event_handlers": {
- "max_processes": 500,
- "wait_for_process": "100",
- "document_changed": [
- {
- "handler": "webhook",
- "url": "https://hookb.in/EWYe5jRW"
- }
- ]
- },
- "bucket":"realize-reader",
- "sync": `function (doc, oldDoc) {
- if(!oldDoc) {
- if(doc && doc.type && doc.userId) {
- requireUser(doc.userId);
- channel("user_" + doc.userId);
- } else {
- throw ({forbidden: "Document type and userId must be specified"});
- }
- } else {
- if(oldDoc.type && oldDoc.userId) {
- requireUser(oldDoc.userId);
- channel("user_" + oldDoc.userId);
- } else if(oldDoc._deleted && doc.type && doc.userId) {
- requireUser(doc.userId);
- channel("user_" + doc.userId);
- } else {
- throw ({forbidden: "Document type and userId must be specified"});
- }
- }
- }`,
- "users": {
- "GUEST": {
- "disabled": true,
- "admin_channels": ["*"]
- },
- "admin": {
- "admin_channels": ["*"],
- "password": "testing123$"
- }
- }
- }
- }
- }
Stikked
