No title Revision 323732346337 (Mon Nov 28 2011 at 09:47) - Diff Link to this snippet: https://friendpaste.com/4q1zeNUEtPFS7XbioPYYzM Embed: manni perldoc borland colorful default murphy trac fruity autumn bw emacs pastie friendly Show line numbers Wrap lines 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071es : ----------- rules shoudl be based on host .- rules depending on the resource : - server : rules defined in .ini - db : rules defined in .db- default cors policy : - allows credential = false - cors enabled- cors can be disabled globalyrules definiton : global wide[httpd]cors_enabled = true[origins]domain.tld = http://origin.tld, https://origin.tld[http://origin.tld]allow_methods = GET, POSTallow_headers = x-couchdb-...allow_credentials = false[https://origin.tld]allow_methods = GET, PUT, POST, DELETEallow_headers = x-couchdb-...allow_credentials = trueallow_server_admins = truemax-age = 36000ond db _security object :{ "origins": { "domain.tld": [ {"http://origin.tld": { "allow_methods": "GET, POST",...} ] }}work flow : is origins list empty in iniyes -> is admin party set ? yes -> return "*" , credentials false (with a good caching policy) no -> stopno -> is origin in .ini ? yes -> is origin in list ? yes -> set the cors headers based on .ini then are we on a db resource ? yes -> apply the intersection of .ini with db resource no -> stop no -> <bikeshed defaults>