|
| 1 | +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> |
| 2 | +<!-- |
| 3 | +Licensed to the Apache Software Foundation (ASF) under one or more |
| 4 | + contributor license agreements. See the NOTICE file distributed with |
| 5 | + this work for additional information regarding copyright ownership. |
| 6 | + The ASF licenses this file to You under the Apache License, Version 2.0 |
| 7 | + (the "License"); you may not use this file except in compliance with |
| 8 | + the License. You may obtain a copy of the License at |
| 9 | +
|
| 10 | + http://www.apache.org/licenses/LICENSE-2.0 |
| 11 | +
|
| 12 | + Unless required by applicable law or agreed to in writing, software |
| 13 | + distributed under the License is distributed on an "AS IS" BASIS, |
| 14 | + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 15 | + See the License for the specific language governing permissions and |
| 16 | + limitations under the License. |
| 17 | +--> |
| 18 | + |
| 19 | + |
| 20 | +<rules> |
| 21 | + <!-- SCM inbound rule --> |
| 22 | + <rule dir="IN" name="OZONE-SCM/ozone-scm/inbound/request" pattern="*://*:*/**/ozone-scm/{path=**}?host={host}?{**}"> |
| 23 | + <rewrite template="{host}/{path=**}?{**}"/> |
| 24 | + </rule> |
| 25 | + |
| 26 | + <!-- SCM outbound rules --> |
| 27 | + <rule dir="OUT" name="OZONE-SCM/ozone-scm/outbound/filter/scmjs" pattern="scm.js"> |
| 28 | + <rewrite template="{gateway.url}/ozone-scm/scm.js?host={$inboundurl[host]}"/> |
| 29 | + </rule> |
| 30 | + |
| 31 | + <rule dir="OUT" name="OZONE-SCM/ozone-scm/outbound/filter/main" pattern="main.html"> |
| 32 | + <rewrite template="main.html?host={$inboundurl[host]}"/> |
| 33 | + </rule> |
| 34 | + |
| 35 | + <rule dir="OUT" name="OZONE-SCM/ozone-scm/outbound/filter/scmoverview" pattern="scm-overview.html"> |
| 36 | + <rewrite template="scm-overview.html?host={$inboundurl[host]}"/> |
| 37 | + </rule> |
| 38 | + |
| 39 | + <rule dir="OUT" name="OZONE-SCM/ozone-scm/outbound/filter/jmx" pattern="/jmx?{**}"> |
| 40 | + <rewrite template="{gateway.url}/ozone-scm/jmx?host={$inboundurl[host]}?{**}"/> |
| 41 | + </rule> |
| 42 | + |
| 43 | + <rule dir="OUT" name="OZONE-SCM/ozone-scm/outbound/filter/jmx2" pattern="jmx?{**}"> |
| 44 | + <rewrite template="jmx?host={$inboundurl[host]}?{**}"/> |
| 45 | + </rule> |
| 46 | + |
| 47 | + <rule dir="OUT" name="OZONE-SCM/ozone-scm/outbound/filter/conf" pattern="conf?{**}"> |
| 48 | + <rewrite template="{gateway.url}/ozone-scm/conf?host={$inboundurl[host]}?{**}"/> |
| 49 | + </rule> |
| 50 | + |
| 51 | + <rule dir="OUT" name="OZONE-SCM/ozone-scm/outbound/filter/logLevel" pattern="logLevel"> |
| 52 | + <rewrite template="{gateway.url}/ozone-scm/logLevel/?host={$inboundurl[host]}"/> |
| 53 | + </rule> |
| 54 | + |
| 55 | + <rule dir="OUT" name="OZONE-SCM/ozone-scm/outbound/filter/stacks" pattern="stacks"> |
| 56 | + <rewrite template="{gateway.url}/ozone-scm/stacks/?host={$inboundurl[host]}"/> |
| 57 | + </rule> |
| 58 | + |
| 59 | + <rule dir="OUT" name="OZONE-SCM/ozone-scm/outbound/filter/static"> |
| 60 | + <match pattern="/static/{path=**}"> |
| 61 | + <rewrite template="{gateway.url}/ozone-scm/static/{path=**}?host={$inboundurl[host]}"/> |
| 62 | + </match> |
| 63 | + </rule> |
| 64 | + |
| 65 | + <rule dir="OUT" name="OZONE-SCM/ozone-scm/outbound/filter/docs"> |
| 66 | + <rewrite template="{gateway.url}/ozone-scm/documentation/docs/index.html?host={$inboundurl[host]}"/> |
| 67 | + </rule> |
| 68 | + |
| 69 | + <!-- SCM filter --> |
| 70 | + |
| 71 | + <filter name="OZONE-SCM/ozone-scm/outbound/response"> |
| 72 | + <content type="*/html"> |
| 73 | + <apply path="scm.js" rule="OZONE-SCM/ozone-scm/outbound/filter/scmjs"/> |
| 74 | + <apply path=".*\.js" rule="OZONE-SCM/ozone-scm/outbound/filter/static"/> |
| 75 | + <apply path=".*\.css" rule="OZONE-SCM/ozone-scm/outbound/filter/static"/> |
| 76 | + <apply path="/docs" rule="OZONE-SCM/ozone-scm/outbound/filter/docs"/> |
| 77 | + <apply path="logLevel" rule="OZONE-SCM/ozone-scm/outbound/filter/logLevel"/> |
| 78 | + <apply path="stacks" rule="OZONE-SCM/ozone-scm/outbound/filter/stacks"/> |
| 79 | + <apply path="\{\{typestat\.protocol\}\}\:\/\/\{\{typestat\.hostname\}\}\:\{\{typestat\.port\}\}" rule="OZONE-SCM/ozone-scm/outbound/datanode/address"/> |
| 80 | + </content> |
| 81 | + <content type="*/javascript"> |
| 82 | + <apply path="main\.html" rule="OZONE-SCM/ozone-scm/outbound/filter/main"/> |
| 83 | + <apply path="scm-overview\.html" rule="OZONE-SCM/ozone-scm/outbound/filter/scmoverview"/> |
| 84 | + <apply path="docs/index\.html" rule="OZONE-SCM/ozone-scm/outbound/filter/docs"/> |
| 85 | + <apply path="static/templates/.*\.html" rule="OZONE-SCM/ozone-scm/outbound/filter/static"/> |
| 86 | + <apply path="/jmx" rule="OZONE-SCM/ozone-scm/outbound/filter/jmx"/> |
| 87 | + <apply path="jmx\?qry" rule="OZONE-SCM/ozone-scm/outbound/filter/jmx2"/> |
| 88 | + <apply path="conf\?cmd" rule="OZONE-SCM/ozone-scm/outbound/filter/conf"/> |
| 89 | + </content> |
| 90 | + </filter> |
| 91 | + |
| 92 | + <!-- documentation inbound rule --> |
| 93 | + |
| 94 | + <rule dir="IN" name="OZONE-SCM/ozone-scm/documentation/inbound/request" pattern="*://*:*/**/ozone-scm/documentation/{path=**}?host={host}?{**}"> |
| 95 | + <rewrite template="{host}/{path=**}?{**}"/> |
| 96 | + </rule> |
| 97 | + |
| 98 | + <!-- documentation outbound rule --> |
| 99 | + |
| 100 | + <rule dir="OUT" name="OZONE-SCM/ozone-scm/documentation/outbound/filter/docs"> |
| 101 | + <match pattern="{**}"> |
| 102 | + <rewrite template="{**}?host={$inboundurl[host]}"/> |
| 103 | + </match> |
| 104 | + </rule> |
| 105 | + |
| 106 | + <!-- documentation filter --> |
| 107 | + |
| 108 | + <filter name="OZONE-SCM/ozone-scm/documentation/outbound/response"> |
| 109 | + <content type="*/html"> |
| 110 | + <apply path=".*\.js" rule="OZONE-SCM/ozone-scm/documentation/outbound/filter/docs"/> |
| 111 | + <apply path=".*\.css" rule="OZONE-SCM/ozone-scm/documentation/outbound/filter/docs"/> |
| 112 | + <apply path=".*\.png" rule="OZONE-SCM/ozone-scm/documentation/outbound/filter/docs"/> |
| 113 | + <apply path=".*\.html" rule="OZONE-SCM/ozone-scm/documentation/outbound/filter/docs"/> |
| 114 | + </content> |
| 115 | + </filter> |
| 116 | + |
| 117 | + <!-- outbound rule for the datanode links on SCM UI --> |
| 118 | + |
| 119 | + <rule dir="OUT" name="OZONE-SCM/ozone-scm/outbound/datanode/address"> |
| 120 | + <match pattern="{{typestat.protocol}}://{{typestat.hostname}}:{{typestat.port}}"/> |
| 121 | + <rewrite template="{gateway.url}/ozone-scm/datanode/index.html?host={{typestat.protocol}}://{{typestat.hostname}}:{{typestat.port}} "/> |
| 122 | + </rule> |
| 123 | + |
| 124 | + <!-- datanode inbound rules --> |
| 125 | + |
| 126 | + <rule dir="IN" name="OZONE-SCM/ozone-scm/datanode/inbound/request" pattern="*://*:*/**/ozone-scm/datanode/{path=**}?host={host}?{**}"> |
| 127 | + <rewrite template="{host}/{path=**}?{**}"/> |
| 128 | + </rule> |
| 129 | + |
| 130 | + <!-- datanode outbound rules --> |
| 131 | + |
| 132 | + <rule dir="OUT" name="OZONE-SCM/ozone-scm/datanode/outbound/filter/dnjs" pattern="dn.js"> |
| 133 | + <rewrite template="{gateway.url}/ozone-scm/datanode/dn.js?host={$inboundurl[host]}"/> |
| 134 | + </rule> |
| 135 | + |
| 136 | + <rule dir="OUT" name="OZONE-SCM/ozone-scm/datanode/outbound/filter/main" pattern="main.html"> |
| 137 | + <rewrite template="main.html?host={$inboundurl[host]}"/> |
| 138 | + </rule> |
| 139 | + |
| 140 | + <rule dir="OUT" name="OZONE-SCM/ozone-scm/datanode/outbound/filter/dnoverview" pattern="dn-overview.html"> |
| 141 | + <rewrite template="dn-overview.html?host={$inboundurl[host]}"/> |
| 142 | + </rule> |
| 143 | + |
| 144 | + <rule dir="OUT" name="OZONE-SCM/ozone-scm/datanode/outbound/filter/jmx" pattern="/jmx?{**}"> |
| 145 | + <rewrite template="{gateway.url}/ozone-scm/datanode/jmx?host={$inboundurl[host]}?{**}"/> |
| 146 | + </rule> |
| 147 | + |
| 148 | + <rule dir="OUT" name="OZONE-SCM/ozone-scm/datanode/outbound/filter/jmx2" pattern="jmx?{**}"> |
| 149 | + <rewrite template="jmx?host={$inboundurl[host]}?{**}"/> |
| 150 | + </rule> |
| 151 | + |
| 152 | + <rule dir="OUT" name="OZONE-SCM/ozone-scm/datanode/outbound/filter/conf" pattern="conf?{**}"> |
| 153 | + <rewrite template="{gateway.url}/ozone-scm/datanode/conf?host={$inboundurl[host]}?{**}"/> |
| 154 | + </rule> |
| 155 | + |
| 156 | + <rule dir="OUT" name="OZONE-SCM/ozone-scm/datanode/outbound/filter/logLevel" pattern="logLevel"> |
| 157 | + <rewrite template="{gateway.url}/ozone-scm/datanode/logLevel/?host={$inboundurl[host]}"/> |
| 158 | + </rule> |
| 159 | + |
| 160 | + <rule dir="OUT" name="OZONE-SCM/ozone-scm/datanode/outbound/filter/stacks" pattern="stacks"> |
| 161 | + <rewrite template="{gateway.url}/ozone-scm/datanode/stacks/?host={$inboundurl[host]}"/> |
| 162 | + </rule> |
| 163 | + |
| 164 | + <rule dir="OUT" name="OZONE-SCM/ozone-scm/datanode/outbound/filter/static"> |
| 165 | + <match pattern="/static/{path=**}"> |
| 166 | + <rewrite template="{gateway.url}/ozone-scm/datanode/static/{path=**}?host={$inboundurl[host]}"/> |
| 167 | + </match> |
| 168 | + </rule> |
| 169 | + |
| 170 | + <rule dir="OUT" name="OZONE-SCM/ozone-scm/datanode/outbound/filter/docs"> |
| 171 | + <rewrite template="{gateway.url}/ozone-scm/documentation/docs/index.html?host={$inboundurl[host]}"/> |
| 172 | + </rule> |
| 173 | + |
| 174 | + <!-- datanode filter --> |
| 175 | + |
| 176 | + <filter name="OZONE-SCM/ozone-scm/datanode/outbound/response"> |
| 177 | + <content type="*/html"> |
| 178 | + <apply path="dn.js" rule="OZONE-SCM/ozone-scm/datanode/outbound/filter/dnjs"/> |
| 179 | + <apply path=".*\.js" rule="OZONE-SCM/ozone-scm/datanode/outbound/filter/static"/> |
| 180 | + <apply path=".*\.css" rule="OZONE-SCM/ozone-scm/datanode/outbound/filter/static"/> |
| 181 | + <apply path="/docs" rule="OZONE-SCM/ozone-scm/datanode/outbound/filter/docs"/> |
| 182 | + <apply path="logLevel" rule="OZONE-SCM/ozone-scm/datanode/outbound/filter/logLevel"/> |
| 183 | + <apply path="stacks" rule="OZONE-SCM/ozone-scm/datanode/outbound/filter/stacks"/> |
| 184 | + </content> |
| 185 | + <content type="*/javascript"> |
| 186 | + <apply path="main\.html" rule="OZONE-SCM/ozone-scm/datanode/outbound/filter/main"/> |
| 187 | + <apply path="dn-overview\.html" rule="OZONE-SCM/ozone-scm/datanode/outbound/filter/dnoverview"/> |
| 188 | + <apply path="docs/index\.html" rule="OZONE-SCM/ozone-scm/datanode/outbound/filter/docs"/> |
| 189 | + <apply path="static/templates/.*\.html" rule="OZONE-SCM/ozone-scm/datanode/outbound/filter/static"/> |
| 190 | + <apply path="/jmx" rule="OZONE-SCM/ozone-scm/datanode/outbound/filter/jmx"/> |
| 191 | + <apply path="jmx\?qry" rule="OZONE-SCM/ozone-scm/datanode/outbound/filter/jmx2"/> |
| 192 | + <apply path="conf\?cmd" rule="OZONE-SCM/ozone-scm/datanode/outbound/filter/conf"/> |
| 193 | + </content> |
| 194 | + </filter> |
| 195 | + |
| 196 | +</rules> |
| 197 | + |
0 commit comments