【发布时间】:2017-12-12 04:23:05
【问题描述】:
我正在尝试配置 JBoss EAP 7(通过 Undertow)以使用 Undertow 处理程序将任何 SPA URL 正确地重写回 SPA 的 index.html。不幸的是,我的 API 位于/api,所以我需要让任何以/api 开头的请求通过。
这是我当前的配置(来自另一个 SO 答案):
not equals(%R, '/my-app') and
not equals(%R, '/my-app/') and
not equals(%R, '/my-app/index.html') and
not path-prefix('/my-app/api') and
not regex('/my-app/.*\.js') and
regex('/my-app/.+') -> rewrite('/my-app/index.html')
不幸的是,这似乎并没有重写任何东西。如何将此配置更新为属性重写 URL?
【问题讨论】:
标签: url-rewriting jboss single-page-application bookmarks undertow