Skip to content

Commit

Permalink
Warn when using sandbox mode via HTTP
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewDryga committed Oct 30, 2016
1 parent 8f87f87 commit 177c010
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/http/endpoint.ex
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ defmodule Tokenizer.HTTP.Endpoint do
"""

use Phoenix.Endpoint, otp_app: :tokenizer_api
require Logger

# Allow acceptance tests to run in concurrent mode
if Application.get_env(:tokenizer_api, :sql_sandbox) do
Logger.warn("This endpoint is running in SQL Sandbox mode, don't enable it on production!")
plug Phoenix.Ecto.SQL.Sandbox
end

Expand Down

0 comments on commit 177c010

Please sign in to comment.