aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorthe lemons <citrons@mondecitronne.com>2022-02-09 01:12:28 -0600
committerthe lemons <citrons@mondecitronne.com>2022-02-09 01:12:28 -0600
commit7bb4a11282af6499029e06ca8992eba6980eac51 (patch)
tree4472c9fae353a5a6bfa9da85e6dca83e39664537
parentd0deeabef7ba7bff783cea03d8fcc13b5876c504 (diff)
allow javascript in browsers to access the "API"
-rwxr-xr-xzzcxz.cgi5
1 files changed, 4 insertions, 1 deletions
diff --git a/zzcxz.cgi b/zzcxz.cgi
index c7b1f63..4227039 100755
--- a/zzcxz.cgi
+++ b/zzcxz.cgi
@@ -562,7 +562,10 @@ map["^/g/(%w%w%w%w%w)/raw$"] = function(p)
local page = load_page(p, true)
if not page then return not_found() end
- return page, { content_type = 'text/plain' }
+ return page, {
+ content_type = 'text/plain',
+ headers = { ['access-control-allow-origin'] = "*" }
+ }
end
map["^/about/?$"] = function()