mirror of
https://github.com/minetest/contentdb.git
synced 2024-12-23 22:42:25 +01:00
10 lines
275 B
Python
10 lines
275 B
Python
from flask import request
|
|
|
|
def isFilenameAllowed(filename, exts):
|
|
return "." in filename and \
|
|
filename.rsplit(".", 1)[1].lower() in exts
|
|
|
|
def shouldReturnJson():
|
|
return "application/json" in request.accept_mimetypes and \
|
|
not "text/html" in request.accept_mimetypes
|