flask-restful-swagger icon indicating copy to clipboard operation
flask-restful-swagger copied to clipboard

Port mismatch for resources

Open mausch opened this issue 9 years ago • 1 comments

I have a Flask app using this Swagger integration behind an internal load balancer in EC2, which I'm accessing in my local browser through SSH port forwarding.

Effectively, this means I enter http://localhost:8070/api/spec.html to access the Swagger endpoint. The problem is that all the resources in that HTML are linking to http://localhost:80 explicitly e.g. http://localhost/api/spec/_/static/swagger-ui.js, which means that they can't be loaded.

Is there any particular reason to avoid relative URLs here?

Thanks

mausch avatar May 18 '15 15:05 mausch

@mausch I can see by looking at the demo that they are indeed using relative URLs. In particular the base URL is formatted differently.

Does anyone want to weigh in on how important this issue is? (May was a long time ago..)

niall-byrne avatar Jan 05 '16 05:01 niall-byrne