Closed c4710n closed 2 years ago
Thank you for the PR but I believe this is working as intended. :) url: [scheme: "http", host: "localhost", port: 4000, path: "/admin"]
configures the URL generation. If you have "/admin", then it means something before Phoenix is processing the request and removing the "/admin" part from it. :) So you need to either remove the :path
or have something before Phoenix (like a nginx reverse proxy) that removes it from you, otherwise more stuff is going to break!
Thank you very much for explaining it. 😄 I got the point.
When I configured an endpoint like this:
This package didn't work as expected, the browser complained something like:
Then, I found the problem - live_reloader.ex#L91
When I configured my app with above code:
path_info
passed to this plug is["admin", "phoenix", "live_reload", "frame"]
path_info
which is["phoenix", "live_reload", "frame"]
Finally, I solve this problem with
script_name
, which is derived from:path
option inconfig :admin_web, AdminWeb.Endpoint
.