Fixes for non-breaking typos and typos configuration
Signed-off-by: Andre Wanlin <awanlin@spotify.com> More Signed-off-by: Andre Wanlin <awanlin@spotify.com>
This commit is contained in:
@@ -235,7 +235,7 @@ export const kubernetesPlugin = createBackendPlugin({
|
||||
auth,
|
||||
httpAuth,
|
||||
}) {
|
||||
// TODO: this could do with a cleanup and push some of this initalization somewhere else
|
||||
// TODO: this could do with a cleanup and push some of this initialization somewhere else
|
||||
if (config.has('kubernetes')) {
|
||||
const initializer = KubernetesInitializer.create({
|
||||
logger,
|
||||
|
||||
@@ -295,11 +295,11 @@ export class KubernetesProxy {
|
||||
originalHeaders: IncomingHttpHeaders,
|
||||
): KubernetesRequestAuth {
|
||||
const obj: KubernetesRequestAuth = {};
|
||||
const headerSplitted = header.split('-');
|
||||
if (headerSplitted.length >= 4) {
|
||||
const framework = headerSplitted[3].toLowerCase();
|
||||
if (headerSplitted.length >= 5) {
|
||||
const provider = headerSplitted.slice(4).join('-').toLowerCase();
|
||||
const headerSplit = header.split('-');
|
||||
if (headerSplit.length >= 4) {
|
||||
const framework = headerSplit[3].toLowerCase();
|
||||
if (headerSplit.length >= 5) {
|
||||
const provider = headerSplit.slice(4).join('-').toLowerCase();
|
||||
obj[framework] = { [provider]: originalHeaders[header] };
|
||||
} else {
|
||||
obj[framework] = originalHeaders[header];
|
||||
|
||||
Reference in New Issue
Block a user