No title Revision 356230613134 (Mon Nov 28 2011 at 09:27) - 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 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970es : ----------- 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]allowed_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 not empty in ini no -> is admin set ? yes -> stop no -> return "*" , credentials false (with a good caching policy) yes -> is origin in .ini ? yes -> use cors rules for it no -> are we on a db resource ? yes -> are origins in db sec obj yes -> is origin in list ? no -> stop yes -> ...