fix: #9719, only apply to non https

This commit is contained in:
Barış Soner Uşaklı
2021-08-23 11:51:36 -04:00
parent 2dcced5518
commit c354cde347

View File

@@ -23,7 +23,7 @@ Write.reload = async (params) => {
router.use('/api/v3', (req, res, next) => {
// 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');
return helpers.formatApiResponse(426, res);
}