mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-27 09:06:15 +01:00
fix: #9719, only apply to non https
This commit is contained in:
@@ -23,7 +23,7 @@ Write.reload = async (params) => {
|
|||||||
|
|
||||||
router.use('/api/v3', (req, res, next) => {
|
router.use('/api/v3', (req, res, next) => {
|
||||||
// Require https if configured so
|
// Require https if configured so
|
||||||
if (apiSettings.requireHttps === 'on') {
|
if (apiSettings.requireHttps === 'on' && req.protocol !== 'https') {
|
||||||
res.set('Upgrade', 'TLS/1.0, HTTP/1.1');
|
res.set('Upgrade', 'TLS/1.0, HTTP/1.1');
|
||||||
return helpers.formatApiResponse(426, res);
|
return helpers.formatApiResponse(426, res);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user