mirror of
https://gitea.invidious.io/iv-org/instances-api.git
synced 2024-08-15 00:53:15 +00:00
Add CORS header for '/instances.json'
This commit is contained in:
parent
5a7ba726c9
commit
555186af62
1 changed files with 2 additions and 0 deletions
|
@ -103,7 +103,9 @@ get "/" do |env|
|
|||
end
|
||||
|
||||
get "/instances.json" do |env|
|
||||
env.response.headers["Access-Control-Allow-Origin"] = "*"
|
||||
env.response.content_type = "application/json; charset=utf-8"
|
||||
|
||||
sort_by = env.params.query["sort_by"]?
|
||||
sort_by ||= "users"
|
||||
|
||||
|
|
Loading…
Reference in a new issue