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()
# The vanilla HTML is wanted
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():
response.setStatus(304)
return ""
......
......@@ -6,6 +6,9 @@ if response is None:
# The vanilla HTML is wanted
response.setBase(None)
# Allow any external app to download the source code
response.setHeader("Access-Control-Allow-Origin", "*")
image = context
if REQUEST.getHeader('If-Modified-Since', '') == image.getModificationDate().rfc822():
response.setStatus(304)
......
......@@ -6,6 +6,9 @@ if response is None:
# The vanilla HTML is wanted
response.setBase(None)
# Allow any external app to download the source code
response.setHeader("Access-Control-Allow-Origin", "*")
web_page = context
web_section = REQUEST.get("current_web_section")
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