no-referrer

This commit is contained in:
w-e-w 2024-04-27 19:21:34 +09:00
parent ddb28b33a3
commit 9d964d3fc3
1 changed files with 1 additions and 1 deletions

View File

@ -50,7 +50,7 @@ def reload_javascript():
def template_response(*args, **kwargs):
res = shared.GradioTemplateResponseOriginal(*args, **kwargs)
res.body = res.body.replace(b'</head>', f'{js}</head>'.encode("utf8"))
res.body = res.body.replace(b'</head>', f'{js}<meta name="referrer" content="no-referrer"/></head>'.encode("utf8"))
res.body = res.body.replace(b'</body>', f'{css}</body>'.encode("utf8"))
res.init_headers()
return res