16 lines
469 B
Python
16 lines
469 B
Python
from tools import *
|
|
from Utils.Config import *
|
|
from Utils.Lib import *
|
|
|
|
|
|
DevMaster = flask.Flask("Org")
|
|
|
|
@DevMaster.after_request
|
|
def DevAfterRequest(response):
|
|
Path: str = flask.request.host.split(".")[0]
|
|
if not all(list(map(lambda x: x.lower() in "qwertyuiopasdfghjklzxcvbnm1234567890_=+", Path))):
|
|
flask.abort(403)
|
|
if not os.path.isdir(os.path.join(TempLate, "ProJect", Path)):
|
|
flask.abort(404)
|
|
pass
|
|
return response |