Skip to content

Instantly share code, notes, and snippets.

@pdx91
Created June 17, 2022 17:21
Show Gist options
  • Save pdx91/75457800a67022057d8a9eb8b56b8adb to your computer and use it in GitHub Desktop.
Save pdx91/75457800a67022057d8a9eb8b56b8adb to your computer and use it in GitHub Desktop.
if Rails.env.development?
ENV["BASE_URL"] = `curl -s http://localhost:4040/api/tunnels/ | jq -r '.tunnels' | jq -r '.[0].public_url' | awk -F/ '{print $3}' | tr -d '\n'`
Rails.application.config.hosts << ENV["BASE_URL"]
Rails.application.config.action_mailer.default_url_options = {
host: ENV["BASE_URL"]
}
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment