api: add cors stuff thing
This commit is contained in:
parent
f3727dcd8a
commit
38df6afb69
1 changed files with 2 additions and 2 deletions
|
@ -5,7 +5,7 @@ defmodule Elstat.API.CurrentStatus do
|
|||
data = Elstat.Manager.get_current_state()
|
||||
|
||||
req = :cowboy_req.reply(200,
|
||||
%{"content-type" => "text/json"},
|
||||
%{"content-type" => "text/json", "Access-Control-Allow-Origin" => "*"},
|
||||
Poison.encode!(data),
|
||||
req0
|
||||
)
|
||||
|
@ -20,7 +20,7 @@ defmodule Elstat.API.Status do
|
|||
graph = Elstat.Manager.get_graph_state()
|
||||
|
||||
req = :cowboy_req.reply(200,
|
||||
%{"content-type" => "text/json"},
|
||||
%{"content-type" => "text/json", "Access-Control-Allow-Origin" => "*"},
|
||||
Poison.encode!(%{
|
||||
status: status,
|
||||
graph: graph,
|
||||
|
|
Loading…
Reference in a new issue