Host app verified routes `url/1`
- Dominant language
- Elixir
- Stars
- 1.3k
- Forks
- 134
- PR merge metrics
- No merged PRs in 30d
Description
Host apps using Beacon have their web modules `MyAppWeb` configured to generate `url/1` with the default host app endpoint, ie:
```elixir
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](https://hexdocs.pm/beacon/Mix.Tasks.Beacon.Gen.ProxyEndpoint.html) 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:
```diff
- endpoint: MyAppWeb.Endpoint,
+ endpoint: MyAppWeb.ProxyEndpoint,
```
Contributor guide
Research direction
Start by tracing the gen.proxy_endpoint task and the host app's verified_routes configuration using Phoenix.VerifiedRoutes. Check how the endpoint and ports are selected after proxy generation; done means verified routes generate URLs through the intended Proxy Endpoint and port, with the relevant behavior covered by existing tests if available.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- elixir
- Domain
- backend, web-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100