1
0
Fork 0
mirror of https://github.com/morpheus65535/bazarr synced 2024-12-25 09:12:38 +00:00

no log: add mimetypes on runtime

This commit is contained in:
vitiko98 2022-07-04 01:18:20 -04:00
parent a748903dc4
commit be93a92a35

View file

@ -2,6 +2,7 @@
import os
import requests
import mimetypes
from flask import request, abort, render_template, Response, session, send_file, stream_with_context, Blueprint
from functools import wraps
@ -30,6 +31,14 @@ static_bp = Blueprint('images', __name__,
ui_bp.register_blueprint(static_bp)
mimetypes.add_type('application/javascript', '.js')
mimetypes.add_type('text/css', '.css')
mimetypes.add_type('font/woff2', '.woff2')
mimetypes.add_type('image/svg+xml', '.svg')
mimetypes.add_type('image/png', '.png')
mimetypes.add_type('image/x-icon', '.ico')
def check_login(actual_method):
@wraps(actual_method)
def wrapper(*args, **kwargs):