mirror of
https://gitea.invidious.io/iv-org/invidious-copy-2022-03-16.git
synced 2024-08-15 00:53:18 +00:00
Add X-Frame-Options, X-XSS-Protection, and X-Content-Type-Options
This commit is contained in:
parent
a749ac73ac
commit
96234e509f
2 changed files with 15 additions and 0 deletions
|
@ -41,6 +41,17 @@ class FilteredCompressHandler < Kemal::Handler
|
|||
end
|
||||
end
|
||||
|
||||
class DenyFrame < Kemal::Handler
|
||||
exclude ["/embed/*"]
|
||||
|
||||
def call(env)
|
||||
return call_next env if exclude_match? env
|
||||
|
||||
env.response.headers["X-Frame-Options"] = "sameorigin"
|
||||
call_next env
|
||||
end
|
||||
end
|
||||
|
||||
def rank_videos(db, n, filter, url)
|
||||
top = [] of {Float64, String}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue