From 1d07607393c5797ed9d458ba44a521d6dadd271f Mon Sep 17 00:00:00 2001 From: Jason Desrosiers Date: Thu, 2 Nov 2023 14:54:52 -0700 Subject: [PATCH 1/3] Add custom headers for meta-schemas --- public/_headers | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 public/_headers diff --git a/public/_headers b/public/_headers new file mode 100644 index 000000000..7a037f385 --- /dev/null +++ b/public/_headers @@ -0,0 +1,4 @@ +/draft*/*/schema + Access-Control-Allow-Origin: * + Content-Type: application/schema+json + Cache-Control: public, max-age=31536000, immutable From 32df599aad8adac6ffda2a72c277dcbb1a73982e Mon Sep 17 00:00:00 2001 From: Jason Desrosiers Date: Fri, 3 Nov 2023 10:50:19 -0700 Subject: [PATCH 2/3] Custom headers only allow one splat --- public/_headers | 45 ++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 44 insertions(+), 1 deletion(-) diff --git a/public/_headers b/public/_headers index 7a037f385..76232d174 100644 --- a/public/_headers +++ b/public/_headers @@ -1,4 +1,47 @@ -/draft*/*/schema +# Dialect Schemas +/draft/:draft/*schema + Access-Control-Allow-Origin: * + Content-Type: application/schema+json + Cache-Control: public, max-age=31536000, immutable + +# Vocabulary Schemas +/draft/:draft/meta/* + Access-Control-Allow-Origin: * + Content-Type: application/schema+json + Cache-Control: public, max-age=31536000, immutable + +# Links Schemas +/draft/:draft/links + Access-Control-Allow-Origin: * + Content-Type: application/schema+json + Cache-Control: public, max-age=31536000, immutable + +# Output Schemas +/draft/:draft/output/*schema + Access-Control-Allow-Origin: * + Content-Type: application/schema+json + Cache-Control: public, max-age=31536000, immutable + +# Older Meta-Schemas +/draft-:draft/*schema + Access-Control-Allow-Origin: * + Content-Type: application/schema+json + Cache-Control: public, max-age=31536000, immutable + +# Older Links Schemas +/draft-:draft/links + Access-Control-Allow-Origin: * + Content-Type: application/schema+json + Cache-Control: public, max-age=31536000, immutable + +# Older Ouput Schemas +/draft/draft-07/hyper-schema-output + Access-Control-Allow-Origin: * + Content-Type: application/schema+json + Cache-Control: public, max-age=31536000, immutable + +# JSON Reference Schemas +/draft-:draft/json-ref Access-Control-Allow-Origin: * Content-Type: application/schema+json Cache-Control: public, max-age=31536000, immutable From 0b6aef060c89b62625c20ec04cc6432997b5636f Mon Sep 17 00:00:00 2001 From: Jason Desrosiers Date: Fri, 3 Nov 2023 11:28:56 -0700 Subject: [PATCH 3/3] Custom Headers: Fix a path typo --- public/_headers | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/_headers b/public/_headers index 76232d174..0690ef49f 100644 --- a/public/_headers +++ b/public/_headers @@ -35,7 +35,7 @@ Cache-Control: public, max-age=31536000, immutable # Older Ouput Schemas -/draft/draft-07/hyper-schema-output +/draft-07/hyper-schema-output Access-Control-Allow-Origin: * Content-Type: application/schema+json Cache-Control: public, max-age=31536000, immutable