mirror of
https://github.com/Tzahi12345/YoutubeDL-Material.git
synced 2026-04-15 01:01:27 +03:00
fixed bug that prevented non-api routes from loading without an auth header
This commit is contained in:
@@ -1230,7 +1230,9 @@ app.use(function(req, res, next) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
app.use(function(req, res, next) {
|
app.use(function(req, res, next) {
|
||||||
if (req.headers.authorization === admin_token) {
|
if (!req.path.includes('/api/')) {
|
||||||
|
next();
|
||||||
|
} else if (req.headers.authorization === admin_token) {
|
||||||
next();
|
next();
|
||||||
} else if (req.headers.authorization && config_api.getConfigItem('ytdl_use_api_key') && req.headers.authorization === config_api.getConfigItem('ytdl_api_key')) {
|
} else if (req.headers.authorization && config_api.getConfigItem('ytdl_use_api_key') && req.headers.authorization === config_api.getConfigItem('ytdl_api_key')) {
|
||||||
next();
|
next();
|
||||||
|
|||||||
Reference in New Issue
Block a user