| <!-- |
| Licensed to the Apache Software Foundation (ASF) under one or more |
| contributor license agreements. See the NOTICE file distributed with |
| this work for additional information regarding copyright ownership. |
| The ASF licenses this file to You under the Apache License, Version 2.0 |
| (the "License"); you may not use this file except in compliance with |
| the License. You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
| --> |
| <rules> |
| <rule dir="IN" name="AMBARIUI/ambari/inbound/root" pattern="*://*:*/**/ambari/"> |
| <rewrite template="{$serviceUrl[AMBARIUI]}/"/> |
| </rule> |
| <rule dir="IN" name="AMBARIUI/ambari/inbound/path" pattern="*://*:*/**/ambari/{**}"> |
| <rewrite template="{$serviceUrl[AMBARIUI]}/{**}"/> |
| </rule> |
| <rule dir="IN" name="AMBARIUI/ambari/inbound/query" pattern="*://*:*/**/ambari/{**}?{**}"> |
| <rewrite template="{$serviceUrl[AMBARIUI]}/{**}?{**}"/> |
| </rule> |
| |
| <rule dir="OUT" name="AMBARIUI/ambari/outbound/sitepath"> |
| <rewrite template="{$frontend[path]}/ambari"/> |
| </rule> |
| |
| <rule dir="OUT" name="AMBARIUI/ambari/outbound/extrapath"> |
| <rewrite template="{$frontend[path]}/ambari/api/v1"/> |
| </rule> |
| |
| <rule dir="OUT" name="AMBARIUI/ambari/outbound/whitelogo"> |
| <rewrite template="img/logo-white.png"/> |
| </rule> |
| <rule dir="OUT" name="AMBARIUI/ambari/outbound/logohref"> |
| <rewrite template="#/main/dashboard"/> |
| </rule> |
| <rule dir="OUT" name="AMBARIUI/ambari/outbound/ambariview"> |
| <rewrite template="img/ambari-view-default.png"/> |
| </rule> |
| <rule dir="OUT" name="AMBARIUI/ambari/outbound/img" pattern="/img/{**}"> |
| <rewrite template="{$frontend[url]}/ambari/img/{**}"/> |
| </rule> |
| |
| <filter name="AMBARIUI/ambari/outbound/proxyroot"> |
| <content type="*/x-javascript"> |
| <apply path="\{proxy_root\}" rule="AMBARIUI/ambari/outbound/sitepath"/> |
| </content> |
| <content type="application/javascript"> |
| <apply path="\{proxy_root\}" rule="AMBARIUI/ambari/outbound/sitepath"/> |
| </content> |
| </filter> |
| |
| <!-- filter to rewrite api prefix defined in .js from root --> |
| <!-- e.g. /api/v1 --> |
| <filter name="AMBARIUI/ambari/outbound/apiendpoint"> |
| <content type="*/x-javascript"> |
| <apply path="/api/v1" rule="AMBARIUI/ambari/outbound/extrapath"/> |
| </content> |
| <content type="application/javascript"> |
| <apply path="/api/v1" rule="AMBARIUI/ambari/outbound/extrapath"/> |
| </content> |
| </filter> |
| |
| <filter name="AMBARIUI/ambari/outbound/apiendpoint/html"> |
| <content type="text/html"> |
| <apply path="/api/v1" rule="AMBARIUI/ambari/outbound/extrapath"/> |
| </content> |
| </filter> |
| |
| <filter name="AMBARIUI/ambari/outbound/apiendpoint/noroot"> |
| <content type="*/x-javascript"> |
| <apply path="api/v1" rule="AMBARIUI/ambari/outbound/extrapath"/> |
| </content> |
| <content type="application/javascript"> |
| <apply path="api/v1" rule="AMBARIUI/ambari/outbound/extrapath"/> |
| </content> |
| </filter> |
| |
| <filter name="AMBARIUI/ambari/outbound/links"> |
| <content type="*/x-javascript"> |
| <apply path="/api/v1" rule="AMBARIUI/ambari/outbound/extrapath"/> |
| <apply path="\{proxy_root\}" rule="AMBARIUI/ambari/outbound/sitepath"/> |
| <apply path="/img/logo-white.png" rule="AMBARIUI/ambari/outbound/whitelogo"/> |
| <apply path="/#/main/dashboard" rule="AMBARIUI/ambari/outbound/logohref"/> |
| <apply path="/img/ambari-view-default.png" rule="AMBARIUI/ambari/outbound/ambariview"/> |
| </content> |
| <content type="application/javascript"> |
| <apply path="/api/v1" rule="AMBARIUI/ambari/outbound/extrapath"/> |
| <apply path="\{proxy_root\}" rule="AMBARIUI/ambari/outbound/sitepath"/> |
| <apply path="/img/logo-white.png" rule="AMBARIUI/ambari/outbound/whitelogo"/> |
| <apply path="/#/main/dashboard" rule="AMBARIUI/ambari/outbound/logohref"/> |
| <apply path="/img/ambari-view-default.png" rule="AMBARIUI/ambari/outbound/ambariview"/> |
| </content> |
| <content type="*/html"> |
| </content> |
| </filter> |
| </rules> |