From 7bb4a11282af6499029e06ca8992eba6980eac51 Mon Sep 17 00:00:00 2001 From: the lemons Date: Wed, 9 Feb 2022 01:12:28 -0600 Subject: allow javascript in browsers to access the "API" --- zzcxz.cgi | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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() -- cgit v1.2.3