Skip to content

Commit 0d081e0

Browse files
feat: 🔧 add cors policy to allow read and post methods for all origins
1 parent 3a47901 commit 0d081e0

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

src/cusy/cms/configure.zcml

+15
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,19 @@
2020

2121
<include package=".packages" />
2222

23+
<!-- CORS policy for cusy.webpolicy.
24+
25+
Allows read-only access from all origins.
26+
Allows post (to submit contact forms).
27+
-->
28+
<plone:CORSPolicy
29+
allow_credentials="true"
30+
allow_headers="Accept,Authorization,Origin,X-Requested-With,Content-Type,Upload-Length,Upload-Offset,Tus-Resumable,Upload-Metadata"
31+
allow_methods="GET,OPTIONS,POST"
32+
allow_origin="*"
33+
expose_headers="Upload-Offset,Location,Upload-Length,Tus-Version,Tus-Resumable,Tus-Max-Size,Tus-Extension,Upload-Metadata"
34+
layer="cusy.cms.interfaces.ICusyCmsLayer"
35+
max_age="3600"
36+
/>
37+
2338
</configure>

0 commit comments

Comments
 (0)