01.11.2024, 13:03
You can create a .lp file that redirects to the specified URL from a storage entry. This way you don't need Custom JS at all. Link URL should be set to /user/redirect.lp.
Code:
<?
require('apps')
url = storage.get('redirect_url')
if url then
ngx.req.discard_body()
ngx.redirect(url)
end