I fixed the issue by overriding the :path attribute of the Endpoint with "/" in the test configuration. The subpath has to be included in the sigil then ~p"/v2/api/stuff".
config :my_app, MyAppWeb.Endpoint,
http: [ip: {127, 0, 0, 1}, port: 4002],
url: [path: "/"],






















