From 9fadb0c7f3d5268db75988a387e4ac9b3a4ec7b7 Mon Sep 17 00:00:00 2001 From: Michael Wallace Date: Thu, 19 May 2022 16:45:12 +1000 Subject: [PATCH 1/2] Add CORS header to support fetching .tsml files in browsers. --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index 9890272..8d0db55 100644 --- a/Makefile +++ b/Makefile @@ -17,6 +17,7 @@ prepare: @test "" != "$(TSMLFILES)" @echo AddType application/tokenscript+xml .tstml > htaccess.tmp @echo Header set Content-type application/tokenscript+xml env=tsml >> htaccess.tmp + @echo Header set Access-Control-Allow-Origin: "*" env=tsml >> htaccess.tmp @echo Options +FollowSymLinks >> htaccess.tmp @echo RewriteEngine on >> htaccess.tmp From 4ac088b331d7d86d25cb54cdff7226473b13c00d Mon Sep 17 00:00:00 2001 From: Michael Wallace Date: Fri, 27 May 2022 14:51:05 +1000 Subject: [PATCH 2/2] Fix typo & add quote escaping. --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 8d0db55..2ed3f23 100644 --- a/Makefile +++ b/Makefile @@ -15,9 +15,9 @@ help: prepare: # Finding tsml files @test "" != "$(TSMLFILES)" - @echo AddType application/tokenscript+xml .tstml > htaccess.tmp + @echo AddType application/tokenscript+xml .tsml > htaccess.tmp @echo Header set Content-type application/tokenscript+xml env=tsml >> htaccess.tmp - @echo Header set Access-Control-Allow-Origin: "*" env=tsml >> htaccess.tmp + @echo Header set Access-Control-Allow-Origin \"*\" >> htaccess.tmp @echo Options +FollowSymLinks >> htaccess.tmp @echo RewriteEngine on >> htaccess.tmp