add security headers

This commit is contained in:
Pete Matsyburka
2026-05-18 16:11:16 +03:00
parent 7fe56941fd
commit 6806772346
4 changed files with 14 additions and 0 deletions
@@ -102,6 +102,10 @@ module Api
headers['X-Robots-Tag'] = 'noindex'
end
def set_security_headers
response.headers['X-Content-Type-Options'] = 'nosniff'
end
def set_cors_headers
headers['Access-Control-Allow-Origin'] = '*'
headers['Access-Control-Allow-Methods'] = 'POST, GET, PUT, PATCH, DELETE, OPTIONS'