ember-cli / ember-ajax

Service for making AJAX requests in Ember applications
MIT License
213 stars 87 forks source link

Host does not resolve when the start of the path is the same string as the namespace. #430

Open andrew-paterson opened 5 years ago

andrew-paterson commented 5 years ago

I'm using Ember 3.1.2, and ember-ajax 3.0.0.

Assuming I'm serving my Ember app at localhost:4200 and have the namespace and host configured as follows:

// services/ajax
namespace: '/foo',
host: `https://test.com`,

If I then call

this.get('ajax').request('/foobar/posts');

the host and namespace are not added to the request URL which becomes

localhost:4200/foobar/posts

where it should be

https://test.com/foo/foobar/posts.