Skip to content

Commit

Permalink
Merge pull request moqui#232 from moqui/acme-docker-compose
Browse files Browse the repository at this point in the history
Add new docker compose ip to /status
  • Loading branch information
acetousk authored Jul 31, 2024
2 parents 9a1b6fd + 3fced4c commit 2e49ac4
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions base-component/webroot/screen/webroot.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ along with this software (see the LICENSE.md file). If not, see
</always-actions>
<transition name="status">
<actions>
<set field="allowed_ips" from="System.getProperty('webapp_status_ips')? System.getProperty('webapp_status_ips').replaceAll('\\s', '').split(',')+['127.0.0.1']: ['127.0.0.1']"/>
<!-- 0:0:0:0:0:0:0:1 is the new docker compose ip for querying /status -->
<set field="allowed_ips" from="System.getProperty('webapp_status_ips')? System.getProperty('webapp_status_ips').replaceAll('\\s', '').split(',')+['127.0.0.1','0:0:0:0:0:0:0:1']: ['127.0.0.1','0:0:0:0:0:0:0:1']"/>
<if condition="ec.user.getClientIp() in allowed_ips"><then>
<script>ec.web.sendJsonResponse(ec.factory.getStatusMap())</script>
</then><else>
Expand All @@ -38,7 +39,7 @@ along with this software (see the LICENSE.md file). If not, see
<actions><script><![CDATA[
List menuDataList = sri.getMenuData(sri.screenUrlInfo.extraPathNameList)
if (menuDataList != null) ec.web.sendJsonResponse(menuDataList)
]]></script></actions>
]]></script></actions>
<!-- NOTE DEJ 20200806 use save-parameters="true" to re-save parameters otherwise lost from the menuData request under vapps, qapps, etc -->
<default-response type="none" save-parameters="true"/>
</transition>
Expand All @@ -54,7 +55,7 @@ along with this software (see the LICENSE.md file). If not, see
outWriter.append("user-agent: *\n")
for (disPath in disallowList) outWriter.append("disallow: /${disPath}\n")
ec.web.sendTextResponse(outWriter.toString())
]]></script>
]]></script>
</actions>
<default-response type="none"/>
</transition>
Expand Down

0 comments on commit 2e49ac4

Please sign in to comment.