Skip to content

Commit

Permalink
修改请求 /rap.plugin.js 时对应的url映射
Browse files Browse the repository at this point in the history
不直接映射到HTTP ROOT, 便于带contextpath部署时路径不出错
  • Loading branch information
ufologist committed Apr 18, 2014
1 parent 15ef34a commit 6f38d0b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion WebContent/WEB-INF/urlrewrite.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
mockjs service
</note>
<from>^/mockjs/(\d*?)/(.*)$</from>
<!-- 注意: 不能去掉前面的斜杠, 否则会造成urlrewrite死循环内存溢出 -->
<to>/mock/createRule.action?id=$1&amp;pattern=/${escape:utf8:$2}</to>
<set type="response-header" name="Access-Control-Allow-Origin">*</set>
<set type="response-header" name="Access-Control-Allow-Headers">Origin, X-Requested-With, Content-Type, Accept</set>
Expand All @@ -34,6 +35,6 @@
mockjs plugin generator
</note>
<from>^/rap.plugin.js(.*)$</from>
<to type="redirect">/mock/createPluginScript.action$1</to>
<to type="redirect">mock/createPluginScript.action$1</to>
</rule>
</urlrewrite>

0 comments on commit 6f38d0b

Please sign in to comment.