mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-20 16:15:59 +01:00
Try to redirect access to files mod_conversejs to cdn when there is no local copies
This commit is contained in:
parent
514bab47a2
commit
e2779e1155
@ -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.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user