Created
December 16, 2019 14:38
-
-
Save phorward/02cc6f73eff06c8e8397ebb34f98e7dc to your computer and use it in GitHub Desktop.
Pyodide server configuration to correctly serve application/wasm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Apache Web Server | |
RewriteEngine off | |
Options -ExecCGI +Indexes | |
IndexOrderDefault Descending Date | |
Header always set Access-Control-Allow-Origin "*" | |
Header always set Access-Control-Allow-Methods GET | |
<FilesMatch "\.py$"> | |
Options +Indexes -ExecCGI -Multiviews | |
Order allow,deny | |
Allow from all | |
RemoveHandler .py | |
AddType text/plain .py | |
</FilesMatch> | |
<FilesMatch "\.data$"> | |
Options +Indexes -ExecCGI -Multiviews | |
Order allow,deny | |
Allow from all | |
RemoveHandler .data | |
AddType application/octet-stream .data | |
</FilesMatch> | |
<FilesMatch "\.wasm$"> | |
Options +Indexes -ExecCGI -Multiviews | |
Order allow,deny | |
Allow from all | |
RemoveHandler .wasm | |
AddType application/wasm .wasm | |
</FilesMatch> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Google App Engine | |
runtime: python27 | |
api_version: 1 | |
handlers: | |
- url: /myapp/s/(.*\.wasm)$ | |
static_files: myapp/\1 | |
upload: myapp/.*\.wasm$ | |
mime_type: application/wasm |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment