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

Removing ":port" from Request URL #2236

Closed
kennytnguyen opened this issue Jun 23, 2016 · 6 comments
Closed

Removing ":port" from Request URL #2236

kennytnguyen opened this issue Jun 23, 2016 · 6 comments
Milestone

Comments

@kennytnguyen
Copy link

I'm on swaggerVersion: "1.2" right now and when I send a request URL, it sends a

"https://{server_ip}:{port}/....."

How do I get rid of the ":{port}" values from the Request URL?

@fehguy
Copy link
Contributor

fehguy commented Jun 23, 2016

Is it using a standard port? What does your basePath look like?

@kennytnguyen
Copy link
Author

my base path looks like

{{server_proto}}://{{server_ip}}/{{api_url}}. but they come out as
{{server_proto}}://{{server_ip}}:{port}/{{api_url}}. it's using internal port.

@kennytnguyen
Copy link
Author

oops. yes* a standard port.

@fehguy
Copy link
Contributor

fehguy commented Jun 23, 2016

OK got it. I think this was introduced recently with swagger-js 2.1.15. Could you please open an issue in that project and it'll get fixed?

@kennytnguyen
Copy link
Author

Okay, I'll wait in the meantime. Thanks!

@kennytnguyen
Copy link
Author

Fixed. In shred.bundle.js.

url: { get: function() { if (!this.scheme) { return null; } return sprintf("%s://%s%s%s", this.scheme, this.host, getPortString(this.scheme, this.port), //removed Port (this.proxy ? "/" : this.path) + (this.query ? ("?" + this.query) : "")); },

you can take out the colon from %s://%s%s%s

@fehguy fehguy added this to the v2.2.1 milestone Aug 23, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants