Skip to content
This repository has been archived by the owner on Mar 25, 2024. It is now read-only.

Use passed URL as schemasURL when is has /schemas suffix #121

Closed
wants to merge 1 commit into from
Closed

Use passed URL as schemasURL when is has /schemas suffix #121

wants to merge 1 commit into from

Conversation

raphink
Copy link

@raphink raphink commented Sep 28, 2016

The X-API-Schemas headers returned by /v1-catalog and child nodes is always /v1, so it's not possible to access the schemas.

With this patch, the API uses the API URL as the schemas URL if it ends with /schemas.

Granted, this should be fixed in Rancher server instead, but at least this PR makes the catalog API usable without upgrading production servers (unless I'm missing something in the docs).

@raphink
Copy link
Author

raphink commented Sep 28, 2016

@vincent99 as mentioned on IRC

@ibuildthecloud
Copy link
Contributor

@raphink Is this an issue in Rancher 1.1? There was a problem in which the internal proxy in Rancher would concatenate headers and not replace them. The result was that instead of setting X-API-Schemas to the correct /v1-catalog URL it would return two headers with /v1 first. Clients would see only that. The end result is I believe this is fixed already in the Rancher 1.2 releases.

@raphink
Copy link
Author

raphink commented Jul 11, 2017

@ibuildthecloud has this been fixed in the server API?

@cjellick
Copy link
Contributor

Very stale. Closing. Thanks! Please open a new PR if there is still a relevant change.

@cjellick cjellick closed this Jul 31, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants