1
0
mirror of https://github.com/octoleo/plantuml-server.git synced 2024-11-14 08:24:06 +00:00

Merge pull request #30 from marcelhuberfoo/master

Use x-forwarded-proto as scheme value if available
This commit is contained in:
arnaudroques 2017-02-25 19:31:06 +01:00 committed by GitHub
commit 7e7ab0f676

View File

@ -7,7 +7,8 @@
(pageContext.request.scheme == 'https' && pageContext.request.serverPort != 443) }">
<c:set var="port" value=":${pageContext.request.serverPort}" />
</c:if>
<c:set var="hostpath" value="${pageContext.request.scheme}://${pageContext.request.serverName}${port}${contextroot}" />
<c:set var="scheme" value="${(not empty header['x-forwarded-proto']) ? header['x-forwarded-proto'] : pageContext.request.scheme}" />
<c:set var="hostpath" value="${scheme}://${pageContext.request.serverName}${port}${contextroot}" />
<c:if test="${!empty encoded}">
<c:set var="imgurl" value="${hostpath}/png/${encoded}" />
<c:set var="svgurl" value="${hostpath}/svg/${encoded}" />