Skip to content

Commit a028344

Browse files
committed
[fix] controller url attribute values
- remove leading slashes - prepend template URLs with $exist:controller
1 parent 61c69ce commit a028344

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

controller.xql

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ else if
9595
)
9696
) then
9797
<dispatch xmlns="http://exist.sourceforge.net/NS/exist">
98-
<forward url="/{$exist:controller}/modules/get-package.xq">
98+
<forward url="{$exist:controller}/modules/get-package.xq">
9999
<add-parameter name="filename" value="{$exist:resource}"/>
100100
</forward>
101101
</dispatch>
@@ -111,7 +111,7 @@ else if
111111
)
112112
) then
113113
<dispatch xmlns="http://exist.sourceforge.net/NS/exist">
114-
<forward url="/{$exist:controller}/modules/get-icon.xq">
114+
<forward url="{$exist:controller}/modules/get-icon.xq">
115115
<add-parameter name="filename" value="{$exist:resource}"/>
116116
</forward>
117117
</dispatch>
@@ -165,7 +165,7 @@ else if
165165
$exist:path = ("/admin", "/publish")
166166
) then
167167
<dispatch xmlns="http://exist.sourceforge.net/NS/exist">
168-
<forward url="login.html"/>
168+
<forward url="{$exist:controller}/login.html"/>
169169
<view>
170170
<forward url="{$exist:controller}/modules/view.xq">
171171
<set-header name="Cache-Control" value="no-cache"/>
@@ -177,7 +177,7 @@ else if
177177
(: Allow authenticated users into admin page :)
178178
else if (request:get-method() = ("GET", "POST") and $exist:path eq "/admin") then
179179
<dispatch xmlns="http://exist.sourceforge.net/NS/exist">
180-
<forward url="admin.html"/>
180+
<forward url="{$exist:controller}/admin.html"/>
181181
<view>
182182
<forward url="{$exist:controller}/modules/view.xq">
183183
<set-header name="Cache-Control" value="no-cache"/>

0 commit comments

Comments
 (0)