diff options
author | the lemons <citrons@mondecitronne.com> | 2022-02-09 01:12:28 -0600 |
---|---|---|
committer | the lemons <citrons@mondecitronne.com> | 2022-02-09 01:12:28 -0600 |
commit | 7bb4a11282af6499029e06ca8992eba6980eac51 (patch) | |
tree | 4472c9fae353a5a6bfa9da85e6dca83e39664537 | |
parent | d0deeabef7ba7bff783cea03d8fcc13b5876c504 (diff) |
allow javascript in browsers to access the "API"
-rwxr-xr-x | zzcxz.cgi | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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() |