This commit is contained in:
@@ -75,7 +75,7 @@ async def security(request, call_next):
|
||||
if settings().api_key and not authenticated(request.headers.get('x-api-key')):
|
||||
return JSONResponse({'success': False, 'error': {'code': 'unauthorized', 'message': 'Provide a valid X-API-Key header'}}, 401)
|
||||
response = await call_next(request)
|
||||
is_viewer = request.url.path.startswith('/view/')
|
||||
is_viewer = request.url.path.startswith(('/view/', '/compare/'))
|
||||
frame_ancestors = "'self' https://git.sadentel.net" if is_viewer else "'none'"
|
||||
response.headers.update({
|
||||
'X-Content-Type-Options': 'nosniff', 'Referrer-Policy': 'no-referrer',
|
||||
|
||||
مرجع در شماره جدید
مسدود کردن کاربر