wallyfoo

wallyfoo

Can't Figure Out How to Make Transactional URLs from phx_gen_html come up as https://

Dokku running a Phoenix app on :80 with a nginx proxy to handle SSL. https://reapervirtual.com

When the phx_gen_auth routes generate a transactional email, the transport prefix seems to be http://

“Makes sense,” I think. After all, the prod.exs endpoint is

config :rconlive, RconliveWeb.Endpoint,
  url: [host: "reapervirtual.com", port: 80]

80 == http://. Fine. So, how do I get the generated URL to come from https://?

Fiddle with the port? Perhaps it’s using the endpoint config. Nope. Setting the port to 443 tacked a port to the end of the url: http://reapervirtual.com:443/

In desperation, I set the :static_url of the endpoint. Maybe if I explicitly state https://reapervirtual.com in the :static_url of the endpoint? No. This breaks the website.

It’s not a huge deal. I automatically redirect to https, but it would look more professional, IMO, if the transport of the link matched the website.

It’s starting to get under my skin. For the life of me, I can’t see where to make this happen.

Any pointers? Am I missing something really obvious? I can’t find any relevant information in the docs.

(Apologies in advance if this has been answered elsewhere. I couldn’t find it searching the forum.)

First Post!

jhefreyzz

jhefreyzz

Could you try if this what’re looking for using SSL

Where Next?

Popular in Questions Top

LegitStack
I’m hoping you guys can give me some general advice and perhaps code examples if you’re feeling up to it. I’m very interested in Elixir,...
New
jerry
Good day to you all. I have been struggling to get a query involving like and ilike to work. Can anyone assist me on this, please? pro...
New
aalberti333
As the title describes, I’m trying to run Enum.map() over a list of key/value pairs, where the value is a map. My data looks like this: ...
New
sacepums
Hey guys. I'm new to elixir and im really stocked about it. But I ran into a bit of problem - I need to convert a date sting, for examp...
New
myronmarston
The Elixir Typespec docs show the following syntax for keyword lists in typespecs: # ... | [key: type] # keyword lis...
New
fayddelight
I tried installing elixir 1.11.2 erlang 23.3.4 via asdf in my zsh shell. Enabled the versions locally and globally. When I list them ...
New
hpopp
To simplify some tasks at work, I wrote and published this package yesterday. It’s a simple macro that enables Access behaviour on struct...
New
beno
I will often find my self writing things similar to: case some_value do nil -> something() "" -> something() _ -> someth...
New
9mm
I am constructing a JSON object (map) and I need to conditionally set a field. I’m trying to write proper elixir-way code… and I’m at a l...
New
idi527
I’ve been re-reading swift book again and noticed that multiline strings there don’t have a trailing line break, unlike in elixir iex(2)...
New

Other popular topics Top

JDanielMartinez
Hi! May someone helps me, please! I have two apps into an umbrella project: the first one is Database, which manages queries, and the se...
New
JorisKok
I have a server on AWS, and was running a load test using artillery. When looking at the Phoenix dashboard I see the Ports going to 100% ...
New
itssasanka
Hi all, Trying to get some more clarity over utc_datetime and naive_datetime for Ecto: https://hexdocs.pm/ecto/Ecto.Schema.html#module-...
New
grych
Hi folks, Few months ago I have announced the proof-of-concept of the library to manipulate the browsers DOM objects directly from Elixi...
639 49522 488
New
fireproofsocks
I’m working on defining a simple Ecto schema for a table (in PostGres), but I don’t see where I can define a column as NOT NULL. Conside...
New
chrismccord
As promised, the first release candidate of Phoenix 1.3.0 is out! This release focuses on code generators with improved project structure...
New
aadeshere1
I have a another noob question about loop. Since elixir is immutable, while loop is not directly possible. total = 10 while total != 0 ...
New
ashish173
I am using Ecto timestamps with postgres, I can see the timestamps() use the :naive_dateime but for my use case I wanted to store the ti...
New
belgoros
I’m not a pro in using Regex and can’t figure out why the following behaviour happens, especially if we take into account the difference ...
New
AstonJ
by Lance Halvorsen Elixir and Phoenix are generating tremendous excitement as an unbeatable platform for building modern web application...
460 27162 124
New

We're in Beta

About us Mission Statement