mirror of
https://github.com/octoleo/plantuml-server.git
synced 2025-01-31 09:38:27 +00:00
Use x-forwarded-proto as scheme value if available
allows transparent usage behind reverse proxy
This commit is contained in:
parent
b1dbb8f0cd
commit
bd927863fe
@ -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}" />
|
||||
|
Loading…
x
Reference in New Issue
Block a user