mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-01 19:46:01 +01:00
fix: force outgoing page on direct access to /ap handler
This commit is contained in:
@@ -48,6 +48,11 @@ Controller.fetch = async (req, res, next) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Force outgoing links page on direct access
|
||||||
|
if (!res.locals.isAPI) {
|
||||||
|
url = new URL(`outgoing?url=${encodeURIComponent(url.href)}`, nconf.get('url'));
|
||||||
|
}
|
||||||
|
|
||||||
helpers.redirect(res, url.href, false);
|
helpers.redirect(res, url.href, false);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
if (!url || !url.href) {
|
if (!url || !url.href) {
|
||||||
|
|||||||
Reference in New Issue
Block a user