Host apps using Beacon have their web modules MyAppWeb configured to generate url/1 with the default host app endpoint, ie:
def verified_routes do
quote do
use Phoenix.VerifiedRoutes,
endpoint: MyAppWeb.Endpoint,
router: MyAppWeb.Router,
statics: MyAppWeb.static_paths()
end
end
Which will generate URLs on the port 4100 after running gen.proxy_endpoint since we change the default endpoint port to 4100 and use 4000 for the Proxy Endpoint, which now is the main entry point for all requests.
We might need to to change the verified route to use Proxy Endpoint as well:
- endpoint: MyAppWeb.Endpoint,
+ endpoint: MyAppWeb.ProxyEndpoint,
Host apps using Beacon have their web modules
MyAppWebconfigured to generateurl/1with the default host app endpoint, ie:Which will generate URLs on the port
4100after running gen.proxy_endpoint since we change the default endpoint port to 4100 and use 4000 for the Proxy Endpoint, which now is the main entry point for all requests.We might need to to change the verified route to use Proxy Endpoint as well: