mirror of
https://github.com/unraid/api.git
synced 2026-02-22 08:18:39 -06:00
feat: fix header strategy
This commit is contained in:
@@ -72,5 +72,6 @@ export const executeRemoteGraphQLQuery = async (
|
||||
remoteQueryLogger.warn('Could not respond %o', error);
|
||||
}
|
||||
remoteQueryLogger.error('Error executing remote query %s', err instanceof Error ? err.message: 'Unknown Error');
|
||||
remoteQueryLogger.trace(err);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { PassportStrategy } from '@nestjs/passport';
|
||||
import { Strategy } from 'passport-http-header-strategy';
|
||||
import { Injectable, Logger } from '@nestjs/common';
|
||||
import { Inject, Injectable, Logger } from '@nestjs/common';
|
||||
import { AuthService } from './auth.service';
|
||||
|
||||
@Injectable()
|
||||
@@ -8,9 +8,7 @@ export class ServerHeaderStrategy extends PassportStrategy(Strategy, 'server-htt
|
||||
static key = 'server-http-header';
|
||||
private readonly logger = new Logger(ServerHeaderStrategy.name);
|
||||
|
||||
constructor(
|
||||
private readonly authService: AuthService,
|
||||
) {
|
||||
constructor(@Inject(AuthService) private readonly authService: AuthService) {
|
||||
super({ header: 'x-api-key', passReqToCallback: false });
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user