mirror of
https://github.com/iv-org/instances-api.git
synced 2025-03-13 09:46:34 -04:00
Simplified CORS method and added comment
This commit is contained in:
parent
b8dc4dac56
commit
4552153f12
@ -83,10 +83,9 @@ spawn do
|
||||
req = client.get("/api/v1/trending")
|
||||
if req.status_code == 200
|
||||
begin
|
||||
if req.headers["Access-Control-Allow-Origin"] == "*"
|
||||
cors = true
|
||||
end
|
||||
cors = (req.headers["Access-Control-Allow-Origin"] == "*")
|
||||
|
||||
# Try to parse the json and validate the api response
|
||||
trending = JSON.parse(req.body)
|
||||
trending[0]["videoId"].as_s
|
||||
api = true
|
||||
|
Loading…
x
Reference in New Issue
Block a user