Closed chrismccord closed 8 years ago
:+1:
Wait, I actually disagree. If you are mounting it inside a path, maybe you should access it inside that path?
I.e. instead of changing the matching code, I would change the generating code to consider script_name, around here: https://github.com/phoenixframework/phoenix_live_reload/pull/30/files#diff-c8be1eead197c8e20eb612e511f68033R69
Something like: config[:url] || ("/" <> Enum.join(conn.script_name, "/"))
That's similar to how our URL helpers would work too, we would just generate links inside the given script name.
@josevalim Thanks and good call. Updated. Now a user can explicitly include the path prefix in their endpoint:
socket "/some_path/phoenix/live_reload/socket", Phoenix.LiveReloader.Socket
Is this what you had in mind?
We had the report of an issue with mounting phoenix at a path, using the
path:
Endpoints url path option. The "/phoenix/live_reload" frame would 404 because it does not take script_name into consideration with the path. @josevalim 2nd pair of eyes please.