mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 01:26:12 +02: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);
|
||||
} catch (e) {
|
||||
if (!url || !url.href) {
|
||||
|
||||
Reference in New Issue
Block a user