【发布时间】:2020-05-15 11:26:10
【问题描述】:
当前版本的 api-platform 和我为 docker-compose / traefik-1 配置找到的示例对我不起作用。
我想出了一个可以正常工作的配置:所有服务都没有转发端口,traefik 背后的服务使用 HTTP,traefik 使用 HTTPS,服务使用主机名:
- https://client.api-platform-new.loc
- https://admin.api-platform-new.loc
- https://vulcain.api-platform-new.loc
到目前为止,一切都很好,但还有一个问题, 管理容器向
发送一个正确的请求https://vulcain.api-platform-new.loc
在我的设置中,但第二个设置为
HTTP://vulcain.api-platform-new.loc:443/docs.jsonld
这似乎是因为https://vulcain.api-platform-new.loc-Request 的“链接”请求标头说:
link: <http://vulcain.api-platform-new.loc:443/docs.jsonld>; rel="http://www.w3.org/ns/hydra/core#apiDocumentation"
(注意 HTTP 与 HTTPS)
导致“出现问题”的原因是:
fetchJsonLd.ts:14 Mixed Content: The page at 'https://admin.api-platform-new.loc/#/' was loaded over HTTPS, but requested an insecure resource 'http://vulcain.api-platform-new.loc:443/docs.jsonld'. This request has been blocked; the content must be served over HTTPS.
我在这一切上花了几天时间,如果有人能告诉我如何修复 Response-Header-Link 以使用 httpS,我会非常高兴!
【问题讨论】:
标签: docker docker-compose traefik api-platform.com