Ignore:
Timestamp:
2023-01-14T16:52:46+13:00 (16 months ago)
Author:
davidb
Message:

New targets to call when you want to work out what the 'internal' (i.e. localhost URL), or the public facing one (which can default all the way back to being localhost, but in production installations is typically different

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/build.xml

    r37052 r37130  
    12141214    </stringutil>
    12151215  </target>
     1216 
     1217  <target name="get-revproxy-servlet-url">
     1218    <if><bool><isset property="revproxy.port"/></bool>
     1219    <property name="revproxy.optport" value=":${revproxy.port}"/>
     1220    <else>
     1221      <property name="revproxy.optport" value=""/>
     1222    </else>
     1223    </if>
     1224    <if><bool><isset property="revproxy.context"/></bool>
     1225    <property name="revproxy.app.path" value="/${revproxy.context}"/>
     1226    <else>
     1227      <property name="revproxy.app.path" value="${app.path}"/>
     1228    </else>
     1229    </if>
     1230
     1231   
     1232    <echo>${revproxy.protocol}://${revproxy.server}${revproxy.optport}${revproxy.app.path}${server.default.servlet}</echo>
     1233  </target>
    12161234
    12171235  <target name="get-default-servlet-url">
     
    12191237  </target>
    12201238
     1239 
    12211240  <!-- returns the base local URL, something like HTTP://127.0.0.1:<HTTPport>
    12221241       or some sane equivalent for 127.0.0.1 -->
     
    12291248  </target>
    12301249
     1250  <target name="get-internal-servlet-url">
     1251    <antcall target="get-local-http-servlet-url" />
     1252  </target>
     1253
     1254  <target name="get-external-servlet-url">     
     1255    <if><bool><isset property="revproxy.server"/></bool>
     1256      <antcall target="get-revproxy-servlet-url"/>
     1257      <else>
     1258    <antcall target="get-default-servlet-url"/>
     1259      </else>
     1260    </if>
     1261  </target>
     1262 
    12311263  <!-- solr should only be accessible locally, which therefore also means only over http.
    12321264  Note that for http, 127.0.0.1 is safer than localhost (as localhost can be mapped to something
Note: See TracChangeset for help on using the changeset viewer.