hotfix: 🚑 compatibility with installations behind .htaccess/.htpasswd that use an Authorization header

This commit is contained in:
Ravinou 2024-09-01 13:58:33 +02:00
commit e87e6d9760
No known key found for this signature in database
GPG key ID: EEEE670C40F6A4D7
3 changed files with 3 additions and 3 deletions

View file

@ -20,7 +20,7 @@ export default async function handler(req, res) {
}
try {
if (authorization) {
if (!session && authorization) {
const API_KEY = authorization.split(' ')[1];
const permissions = await tokenController(API_KEY, FROM_IP);
if (!permissions) {

View file

@ -17,7 +17,7 @@ export default async function handler(req, res) {
}
try {
if (authorization) {
if (!session && authorization) {
const API_KEY = authorization.split(' ')[1];
const permissions = await tokenController(API_KEY, FROM_IP);
if (!permissions) {

View file

@ -17,7 +17,7 @@ export default async function handler(req, res) {
}
try {
if (authorization) {
if (!session && authorization) {
const API_KEY = authorization.split(' ')[1];
const permissions = await tokenController(API_KEY, FROM_IP);
if (!permissions) {