Spaces:
Running
Running
zhzluke96 commited on
Commit ·
72bb5b8
1
Parent(s): 94466ce
update
Browse files118 unmodified lines119120121122123124125126127128129130131122123124118 unmodified lines ), }, ) # gradio uses a very open CORS policy via app.user_middleware, which makes it possible for # an attacker to trick the user into opening a malicious HTML page, which makes a request to the # running web ui and do whatever the attacker wants, including installing an extension and # running its code. We disable this here. Suggested by RyotaK. app.user_middleware = [ x for x in app.user_middleware if x.cls.__name__ != "CustomCORSMiddleware" ]
if api: process_api_args(args, app)
if __name__ == "__main__":webui.py-10