Skip to content

selfLink doesn't behave correctly with Cross-site baseurls #493

Open
@aarcro

Description

@aarcro

I'm serving my Angular app from localhost:8000, with django running a tastypie backend on localhost:8888. I'm simulating a mobile app, so I have no need or desire to have django server the angular app.

With a config like this:

RestangularProvider.setBaseUrl('http://localhost:8888/api/v1/');  // Following the bing example
RestangularProvider.setRestangularFields({
  selfLink: 'resource_uri'
});

and resoure_uri values, which look like: "/api/v1/object/id"

The generated path when trying to put is:
http://localhost:8888/api/v1//api/v1/object/id

Perhaps BaseUrl should be split to BasePath and BaseDomain?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions