Commit 42fef3a8 authored by Romain Courteaud's avatar Romain Courteaud

[erp5_web_render_ui] Allow any external app to download the source code

parent a5bd823c
...@@ -9,6 +9,9 @@ file_content = file.getData() ...@@ -9,6 +9,9 @@ file_content = file.getData()
# The vanilla HTML is wanted # The vanilla HTML is wanted
response.setBase(None) response.setBase(None)
# Allow any external app to download the source code
response.setHeader("Access-Control-Allow-Origin", "*")
if REQUEST.getHeader('If-Modified-Since', '') == file.getModificationDate().rfc822(): if REQUEST.getHeader('If-Modified-Since', '') == file.getModificationDate().rfc822():
response.setStatus(304) response.setStatus(304)
return "" return ""
......
...@@ -6,6 +6,9 @@ if response is None: ...@@ -6,6 +6,9 @@ if response is None:
# The vanilla HTML is wanted # The vanilla HTML is wanted
response.setBase(None) response.setBase(None)
# Allow any external app to download the source code
response.setHeader("Access-Control-Allow-Origin", "*")
image = context image = context
if REQUEST.getHeader('If-Modified-Since', '') == image.getModificationDate().rfc822(): if REQUEST.getHeader('If-Modified-Since', '') == image.getModificationDate().rfc822():
response.setStatus(304) response.setStatus(304)
......
...@@ -6,6 +6,9 @@ if response is None: ...@@ -6,6 +6,9 @@ if response is None:
# The vanilla HTML is wanted # The vanilla HTML is wanted
response.setBase(None) response.setBase(None)
# Allow any external app to download the source code
response.setHeader("Access-Control-Allow-Origin", "*")
web_page = context web_page = context
web_section = REQUEST.get("current_web_section") web_section = REQUEST.get("current_web_section")
if web_section is None: if web_section is None:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment