aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mod_conversejs.erl4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mod_conversejs.erl b/src/mod_conversejs.erl
index 61cec2322..fba05c1f7 100644
--- a/src/mod_conversejs.erl
+++ b/src/mod_conversejs.erl
@@ -117,7 +117,9 @@ is_served_file(_) -> false.
serve(Host, LocalPath) ->
case get_conversejs_resources(Host) of
- undefined -> ejabberd_web:error(not_found);
+ undefined ->
+ Path = str:join(LocalPath, <<"/">>),
+ {303, [{<<"Location">>, <<"https://cdn.conversejs.org/dist/", Path/binary>>}], <<>>};
MainPath -> serve2(LocalPath, MainPath)
end.