* fixed broken mime types

This commit is contained in:
KF 2019-08-27 21:46:14 -05:00
parent 7d2080a1d1
commit 127df8b2a3

View File

@ -18,8 +18,14 @@
along with this program. If not, see <https://www.gnu.org/licenses/>.
'''
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