Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Website: Add .htaccess file to prevent caching of index.html and enable importing the client.js library #989

Merged
merged 1 commit into from
Jan 31, 2024

Conversation

adamziel
Copy link
Collaborator

Adds a .htaccess file to playground.wordpress.net that does the following:

  1. Prevents caching of the main index.html file. Otherwise the browser may try to load outdated JavaScript, CSS, and WASM assets and and up in a broken state.
  2. Adds the Access-Control-Allow-Origin header for the blueprint-schema.json file and the hosted client.js library to enable import()-ing both.

Testing instructions

None. I tested this in an Apache setup, then manually updated the production .htaccess file, and it all worked as expected.

Related to #855
Closes #873

Adds a .htaccess file to playground.wordpress.net that does the following:

1. Prevents caching of the main index.html file. Otherwise the browser may
   try to load outdated JavaScript, CSS, and WASM assets and and up in a
   broken state.
2. Adds the Access-Control-Allow-Origin header for the blueprint-schema.json
   file and the hosted client.js library to enable `import()`-ing both.

 ## Testing instructions

None. I tested this in an Apache setup, then manually updated the production
.htaccess file, and it all worked as expected.

Related to #855
Closes #873
@adamziel adamziel changed the title Website: Add .htaccess file Website: Add .htaccess file to prevent caching of index.html and enable importing the client.js library Jan 31, 2024
@adamziel adamziel merged commit 005e883 into trunk Jan 31, 2024
4 checks passed
@adamziel adamziel deleted the website-htaccess branch January 31, 2024 11:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update .htaccess to serve correct CORS headers for /client/index.js
1 participant