mirror of
https://github.com/wu736139669/hapi.git
synced 2026-11-24 04:47:03 +00:00
fix(cli): load extra headers from settings (#1041)
* test: reproduce issue #786 * fix: load extra headers from settings (closes #786) * test: cover extra header precedence and redaction * fix: redact persisted extra headers in diagnostics * test: cover runner extra header identity * fix: restart runner when extra headers change
This commit is contained in:
@@ -13,6 +13,7 @@ import chalk from 'chalk'
|
||||
import { configuration } from '@/configuration'
|
||||
import { readSettings, updateSettings } from '@/persistence'
|
||||
import { initializeApiUrl } from '@/ui/apiUrlInit'
|
||||
import { initializeExtraHeaders } from '@/ui/extraHeadersInit'
|
||||
|
||||
/**
|
||||
* Initialize CLI API token
|
||||
@@ -21,6 +22,7 @@ import { initializeApiUrl } from '@/ui/apiUrlInit'
|
||||
export async function initializeToken(): Promise<void> {
|
||||
// Initialize API URL first (env > settings.json > default)
|
||||
await initializeApiUrl()
|
||||
await initializeExtraHeaders()
|
||||
|
||||
// 1. Environment variable has highest priority (allows temporary override)
|
||||
if (configuration.cliApiToken) {
|
||||
|
||||
Reference in New Issue
Block a user