Give JSON files the Access-Control-Allow-Origin: * header (#2172)

This commit is contained in:
LumarisX 2023-11-04 00:04:15 -07:00 committed by GitHub
parent e7814d3c6d
commit f9bc940eb5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -91,6 +91,7 @@ RewriteCond %{HTTP_HOST} ^www\.play\.pokemonshowdown\.com$ [NC]
RewriteRule ^(.*) https://play.pokemonshowdown.com/$1 [R=301,L]
RewriteRule ^style/fonts?/.*?\.(eot|svg|ttf|woff|woff2)$ - [E=SAFE_RESOURCE:1]
RewriteRule ^data/(moves|abilities|learnsets).json$ - [E=SAFE_RESOURCE:1]
Header set Access-Control-Allow-Origin * env=SAFE_RESOURCE
# Redirect old battles to their corresponding replay