diff --git a/onionr/httpapi/miscclientapi/staticfiles.py b/onionr/httpapi/miscclientapi/staticfiles.py index d43d5b7f..3582ed24 100644 --- a/onionr/httpapi/miscclientapi/staticfiles.py +++ b/onionr/httpapi/miscclientapi/staticfiles.py @@ -18,8 +18,14 @@ along with this program. If not, see . ''' import os +import mimetypes from flask import Blueprint, send_from_directory +# Was having some mime type issues on windows, this appeared to fix it. +# we have no-sniff set, so if the mime types are invalid sripts can't load. +mimetypes.add_type('application/javascript', '.js') +mimetypes.add_type('text/css', '.css') + static_files_bp = Blueprint('staticfiles', __name__) root = os.getcwd() + '/static-data/www/' # should be set to onionr install directory from onionr startup