4q1zeNUEtPFS7XbioPYYzM changeset

Changeset313438613730 (b)
Parent636636313834 (a)
ab
2929
3030
3131[https://origin.tld]
...
32-allowed_methods = GET, PUT, POST, DELETE
32+allow_methods = GET, PUT, POST, DELETE
...
3333allow_headers = x-couchdb-...
3434allow_credentials = true
3535allow_server_admins = true
...
5252
5353work flow :
5454
...
55-is origins list not empty in ini
55-no -> is admin set ?
55+is origins list empty in ini
55+yes -> is    admin set ?
...
5757  yes -> stop
5858  no -> return "*" , credentials false (with a good caching policy)
...
59-yes ->
59-
59-is origin in .ini ?
59-yes -> use cors rules for it
59-no -> are we on a db resource ?
59-  yes -> are origins in db sec obj
59-   
59-yes ->
59-   is origin in list ?
59-   no -> stop
59-   yes -> ...
59+no ->
59+  is origin in .ini ?
59+  yes ->
59+    is origin in list ?
59+    yes ->
59+      set the cors headers based on .ini
59+      then are we on a db resource ?
59+        yes ->
59+          apply the intersection of .ini with db resource
59+    no -> stop
59+  no ->
59+    <bikeshed defaults>
...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
--- Revision 636636313834
+++ Revision 313438613730
@@ -30,7 +30,7 @@
[https://origin.tld]
-allowed_methods = GET, PUT, POST, DELETE
+allow_methods = GET, PUT, POST, DELETE
allow_headers = x-couchdb-...
allow_credentials = true
allow_server_admins = true
@@ -53,18 +53,19 @@
work flow :
-is origins list not empty in ini
-no -> is admin set ?
+is origins list empty in ini
+yes -> 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 -> ...
+no ->
+ 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>