ash-project / ash_json_api

The JSON:API extension for the Ash Framework
https://hexdocs.pm/ash_json_api
MIT License
56 stars 40 forks source link

Resource links use conn url instead of Endpoint url #94

Closed gordoneliel closed 1 year ago

gordoneliel commented 1 year ago

I'm using a service backed by ash behind a gateway. When I request a resource, the links generated use the request url instead of the url configured by the endpoint. Ideally I think we should be using 'Endpoint.url()' as the base url for resource links instead of the conn url as links will be incorrect when behind a proxy.

Happy to take this on if it makes sense!

zachdaniel commented 1 year ago

That makes perfect sense! Thanks for offering to handle it, look forward to your PR!