This commit is contained in:
@@ -36,6 +36,11 @@ config :ex_aws, :s3,
|
|||||||
|
|
||||||
config :provider_service, :s3_bucket, System.get_env("S3_BUCKET", "provider-service")
|
config :provider_service, :s3_bucket, System.get_env("S3_BUCKET", "provider-service")
|
||||||
|
|
||||||
|
cors_origin = System.get_env("CORS_ORIGIN", "*")
|
||||||
|
|
||||||
|
config :cors_plug,
|
||||||
|
origin: cors_origin
|
||||||
|
|
||||||
# ## Using releases
|
# ## Using releases
|
||||||
#
|
#
|
||||||
# If you use `mix release`, you need to explicitly enable the server
|
# If you use `mix release`, you need to explicitly enable the server
|
||||||
|
|||||||
@@ -20,6 +20,6 @@ defmodule ProviderServiceWeb.Endpoint do
|
|||||||
plug(Plug.MethodOverride)
|
plug(Plug.MethodOverride)
|
||||||
plug(Plug.Head)
|
plug(Plug.Head)
|
||||||
plug(Plug.Session, @session_options)
|
plug(Plug.Session, @session_options)
|
||||||
plug(CORSPlug, origin: ["http://localhost:3000"])
|
plug(CORSPlug)
|
||||||
plug(ProviderServiceWeb.Router)
|
plug(ProviderServiceWeb.Router)
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -39,6 +39,8 @@ controllers:
|
|||||||
LOG_LEVEL: debug
|
LOG_LEVEL: debug
|
||||||
MIX_ENV: prod
|
MIX_ENV: prod
|
||||||
PORT: "8080"
|
PORT: "8080"
|
||||||
|
CORS_ORIGIN:
|
||||||
|
value: "*"
|
||||||
PHX_HOST: "0.0.0.0"
|
PHX_HOST: "0.0.0.0"
|
||||||
PHX_SERVER: "true"
|
PHX_SERVER: "true"
|
||||||
S3_HOST:
|
S3_HOST:
|
||||||
|
|||||||
Reference in New Issue
Block a user