File tree 1 file changed +8
-1
lines changed
1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 23
23
"required" : true ,
24
24
"type" : " string"
25
25
},
26
+ {
27
+ "description" : " Allowed HTTP Headers that requestor can use" ,
28
+ "label" : " Allowed HTTP Headers" ,
29
+ "name" : " cors_allowed_headers" ,
30
+ "required" : false ,
31
+ "type" : " string"
32
+ },
26
33
{
27
34
"description" : " Regex matching origins that are allowed to access this service" ,
28
35
"label" : " Regex matching origins" ,
39
46
},
40
47
"vcl" : [
41
48
{
42
- "template" : " if (req.http.Origin && !resp.http.Access-Control-Allow-Origin && !resp.http.Access-Control-Allow-Methods) {\n {{#ifEq origin \" anyone\" }}\n set resp.http.Access-Control-Allow-Origin = \" *\" ;\n {{/ifEq}}\n {{#ifEq origin \" regex-match\" }}\n if ( req.http.Origin ~ \" ^https?://{{cors_allowed_origins_regex}}\" ) {\n set resp.http.Access-Control-Allow-Origin = req.http.origin;\n }\n {{/ifEq}}\n set resp.http.Access-Control-Allow-Methods = \" {{cors_allowed_methods}}\" ;\n set resp.http.Vary:Origin = \"\" ;\n \n }\n " ,
49
+ "template" : " if (req.http.Origin && !resp.http.Access-Control-Allow-Origin && !resp.http.Access-Control-Allow-Methods && !resp.http.Access-Control-Allow-Headers ) {\n {{#ifEq origin \" anyone\" }}\n set resp.http.Access-Control-Allow-Origin = \" *\" ;\n {{/ifEq}}\n {{#ifEq origin \" regex-match\" }}\n if ( req.http.Origin ~ \" ^https?://{{cors_allowed_origins_regex}}\" ) {\n set resp.http.Access-Control-Allow-Origin = req.http.origin;\n }\n {{/ifEq}}\n set resp.http.Access-Control-Allow-Methods = \" {{cors_allowed_methods}}\" ;\n {{#if cors_allowed_headers}} \n set resp.http.Access-Control-Allow-Headers = \" {{cors_allowed_headers}} \" ; \n {{/if}} \n set resp.http.Vary:Origin = \"\" ;\n \n }\n " ,
43
50
"type" : " deliver"
44
51
}
45
52
],
You can’t perform that action at this time.
0 commit comments