Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Relative selfLinks + baseUrl #665

Open
kevinrenskers opened this issue Apr 9, 2014 · 6 comments
Open

Relative selfLinks + baseUrl #665

kevinrenskers opened this issue Apr 9, 2014 · 6 comments
Labels

Comments

@kevinrenskers
Copy link

If my self link looks like this:

"self": {
    "link": "/conversations/1"
}, 

And I have the following configuration:

RestangularProvider.setBaseUrl('http://myapi.com/api');
RestangularProvider.setRestangularFields({selfLink: 'self.link'});

Then I would expect the element to have the link http://myapi.com/api/conversations/1. Sadly the url is instead http://localhost:8080/conversations/1 when running on localhost.

@mgonto
Copy link
Owner

mgonto commented Apr 16, 2014

You're right.

Marking this as bug.

Cheers

@kevinrenskers
Copy link
Author

It would be great to have this fixed (and marked as a bug). When using a staging API and production API, we would really like to return relative self links, which currently doesn't work (and thus the API always needs to return full links).

@thegris
Copy link

thegris commented Sep 25, 2014

First of all, self links are an awesome feature!

I'm running into this same issue. I am running locally with angular and REST endpoints being served from different ports. The relative href's are being interpreted as coming from the web URL, not the REST URL.

Thanks!

@Daanoz
Copy link

Daanoz commented Apr 13, 2016

So, we just ran into this issue. Is there any update on this issue? We can work around it with a responseInterceptor but that's not really nice of course...

I see some open pull requests/comments, but not really a fix:

@yusufumac
Copy link

+1

@daviesgeek
Copy link
Collaborator

It looks like #851 was slated for release in 1.5.0. I reviewed the PR and hopefully we'll be able to get this merged in pretty soon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants