mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-11 18:16:40 +00:00
Fix error loading ifctester webapp (infinite "initialize environment...")
Browser was stuck trying to initialize the environment, because of the error below:
[worker] Received message: {type: 'init', payload: {…}, id: '9dLz/0eBQDa0xTQORXfdUg/0'} :5000/pyodide/pyodide.mjs:1 Failed to load module script: Expected a JavaScript-or-Wasm module script but the server responded with a MIME type of "text/plain". Strict MIME type checking is enforced for module scripts per HTML spec.
This commit is contained in:
@@ -18,8 +18,13 @@
|
||||
|
||||
import os
|
||||
import argparse
|
||||
import mimetypes
|
||||
from flask import Flask, send_from_directory, send_file
|
||||
|
||||
# Browsers expecting this specific MIME type for .mjs files,
|
||||
# otherwise they fail to load.
|
||||
mimetypes.add_type("text/javascript", ".mjs")
|
||||
|
||||
app = Flask(__name__)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user