NCATS-Gamma / robokop

Master UI for ROBOKOP
MIT License
16 stars 3 forks source link

NGINX Subservice APIDocs issues #402

Closed kennethmorton closed 5 years ago

kennethmorton commented 5 years ago

Using any of the UI on https://robokop.renci.org/ranker/apidocs/ does not correctly route the internal requests. For example the cypher answers service posts to

https://robokop.renci.org/api/cypher/answers/?max_connectivity=0

when really it should post to

https://robokop.renci.org/ranker/apidocs/cypher/answers/?max_connectivity=0

Is there a way to configure the individual swagger / flasgger things to do this correctly behind NGINX?

kennethmorton commented 5 years ago

The same is true for interfaces, I assume.

patrickkwang commented 5 years ago

Maybe this: https://github.com/rochacbruno/flasgger#behind-a-reverse-proxy

YaphetKG commented 5 years ago

We have had a header coming from Nginx if you take a look at /robokop/deploy/proxy/configs/default.conf.template , the ranker and interfaces all have a header called 'X-Swagger-Prefix' set to '/ranker' and '/builder'

YaphetKG commented 5 years ago

I have the changes in place for ranker and builder to read the 'X-Swagger-Prefix' from the headers and apply it if present, @patrickkwang Thanks for the pointer.