我一直在试图夸夸张地工作,支持国家地理信息小组的反面代理,但我不能这样做。 我的服务在码头集装箱中进行,我想用这些样本ur:
我的服务:
http://service-host.example.com/my-service1
www.un.org/Depts/DGACM/index_spanish.htm www.un.org/Depts/DGACM/index_spanish.htm Swagger:
http://service-host.example.com/my-service1/api
www.un.org/Depts/DGACM/index_spanish.htm
我的空洞区块就这样:
location /my-service1 {
resolver 127.0.0.11 valid=30s;
set $upstream my-host.example.com;
proxy_pass http://$upstream/home;
location ~ /api {
resolver 127.0.0.11 valid=30s;
set $upstream my-host.example.com;
proxy_pass http://$upstream/swagger-ui.html;
}
location ~ /webjars {
resolver 127.0.0.11 valid=30s;
set $upstream my-host.example.com;
proxy_pass http://$upstream/;
}
location ~ /v2 {
resolver 127.0.0.11 valid=30s;
set $upstream my-host.example.com;
proxy_pass http://$upstream/;
}
location ~ /swagger-resources {
resolver 127.0.0.11 valid=30s;
set $upstream my-host.example.com;
proxy_pass http://$upstream/;
}
}
我的NGI Singh记录就是这样的:
GET /my-service1/api/ HTTP/2.0" 200
GET /my-service1/api/webjars/springfox-swagger-ui/springfox.css?v=2.9.2 HTTP/2.0" 200
GET /my-service1/api/webjars/springfox-swagger-ui/swagger-ui-bundle.js?v=2.9.2 HTTP/2.0" 200
GET /my-service1/api/webjars/springfox-swagger-ui/swagger-ui.css?v=2.9.2 HTTP/2.0" 200
GET /my-service1/api/webjars/springfox-swagger-ui/springfox.js?v=2.9.2 HTTP/2.0" 200
GET /my-service1/api/webjars/springfox-swagger-ui/swagger-ui-standalone-preset.js?v=2.9.2 HTTP/2.0" 200
如果不通过国家地理信息小组进行直接测试,这一过程就会进一步推进,而全球教育论坛则会投入到/v2/api和/swagger-resources。 在此之前,使用反面代理就 st了。
关于如何解决这一问题的任何建议?
EDIT:在不试图推翻代理的情况下,这里是一个NGI 陈词,但直接投到http://myservice.example.com/swagger-ui.html。 它完美地发挥作用!
myservice.example.com 192.168.1.30 - - [12/Feb/2019:09:59:44 +0000] "GET /swagger-ui.html HTTP/2.0" 200 3318 "-" "Mozilla/5.0 (Windows NT 6.1; rv:60.0) Gecko/20100101 Firefox/60.0"
myservice.example.com 192.168.1.30 - - [12/Feb/2019:09:59:44 +0000] "GET /webjars/springfox-swagger-ui/springfox.css?v=2.9.2 HTTP/2.0" 200 2894 "https://myservice.example.com/swagger-ui.html" "Mozilla/5.0 (Windows NT 6.1; rv:60.0) Gecko/20100101 Firefox/60.0"
myservice.example.com 192.168.1.30 - - [12/Feb/2019:09:59:44 +0000] "GET /webjars/springfox-swagger-ui/swagger-ui.css?v=2.9.2 HTTP/2.0" 200 154488 "https://myservice.example.com/swagger-ui.html" "Mozilla/5.0 (Windows NT 6.1; rv:60.0) Gecko/20100101 Firefox/60.0"
myservice.example.com 192.168.1.30 - - [12/Feb/2019:09:59:45 +0000] "GET /webjars/springfox-swagger-ui/swagger-ui-bundle.js?v=2.9.2 HTTP/2.0" 200 1448844 "https://myservice.example.com/swagger-ui.html" "Mozilla/5.0 (Windows NT 6.1; rv:60.0) Gecko/20100101 Firefox/60.0"
myservice.example.com 192.168.1.30 - - [12/Feb/2019:09:59:45 +0000] "GET /webjars/springfox-swagger-ui/springfox.js?v=2.9.2 HTTP/2.0" 200 96207 "https://myservice.example.com/swagger-ui.html" "Mozilla/5.0 (Windows NT 6.1; rv:60.0) Gecko/20100101 Firefox/60.0"
myservice.example.com 192.168.1.30 - - [12/Feb/2019:09:59:45 +0000] "GET /webjars/springfox-swagger-ui/swagger-ui-standalone-preset.js?v=2.9.2 HTTP/2.0" 200 440850 "https://myservice.example.com/swagger-ui.html" "Mozilla/5.0 (Windows NT 6.1; rv:60.0) Gecko/20100101 Firefox/60.0"
myservice.example.com 192.168.1.30 - - [12/Feb/2019:09:59:46 +0000] "GET /swagger-resources/configuration/ui HTTP/2.0" 200 450 "https://myservice.example.com/swagger-ui.html" "Mozilla/5.0 (Windows NT 6.1; rv:60.0) Gecko/20100101 Firefox/60.0"
myservice.example.com 192.168.1.30 - - [12/Feb/2019:09:59:46 +0000] "GET /swagger-resources/configuration/security HTTP/2.0" 200 2 "https://myservice.example.com/swagger-ui.html" "Mozilla/5.0 (Windows NT 6.1; rv:60.0) Gecko/20100101 Firefox/60.0"
myservice.example.com 192.168.1.30 - - [12/Feb/2019:09:59:46 +0000] "GET /swagger-resources HTTP/2.0" 200 90 "https://myservice.example.com/swagger-ui.html" "Mozilla/5.0 (Windows NT 6.1; rv:60.0) Gecko/20100101 Firefox/60.0"
myservice.example.com 192.168.1.30 - - [12/Feb/2019:09:59:46 +0000] "GET /v2/api-docs HTTP/2.0" 200 8387 "https://myservice.example.com/swagger-ui.html" "Mozilla/5.0 (Windows NT 6.1; rv:60.0) Gecko/20100101 Firefox/60.0"