allow netlify deploy previews under CORS

This commit is contained in:
Tao Bror Bojlén 2019-08-22 10:59:57 +02:00
parent 7ce001fa54
commit c85d455a61
No known key found for this signature in database
GPG Key ID: C6EC7AAB905F9E6F
1 changed files with 5 additions and 1 deletions

View File

@ -46,7 +46,11 @@ defmodule BackendWeb.Endpoint do
)
plug(Corsica,
origins: ["http://localhost:3000", ~r{^https?://(.*\.?)fediverse\.space$}],
origins: [
"http://localhost:3000",
~r{^https?://(.*\.?)fediverse\.space$},
~r{^https?://(.*\.?)fediverse-space\.netlify.com$}
],
allow_headers: ["content-type", "token"]
)