Class: Config
Coordinates the application configuration
Implements
Config
Constructors
constructor
• new Config(config
, configOverrideOptions?
)
Parameters
Name | Type | Default value |
---|---|---|
config | ConfigYaml & { config_path : string } | undefined |
configOverrideOptions | Object | undefined |
configOverrideOptions.forceMigrateToSecureLegacySignature | boolean | true |
Defined in
Properties
auth
• auth: any
Implementation of
AppConfig.auth
Defined in
configOverrideOptions
• Private
configOverrideOptions: Object
Type declaration
Name | Type |
---|---|
forceMigrateToSecureLegacySignature | boolean |
Defined in
configPath
• configPath: string
Implementation of
AppConfig.configPath
Defined in
flags
• flags: FlagsConfig
Implementation of
AppConfig.flags
Defined in
packages
• packages: PackageList
Implementation of
AppConfig.packages
Defined in
plugins
• plugins: null
| string
| void
Implementation of
AppConfig.plugins
Defined in
secret
• secret: string
Implementation of
AppConfig.secret
Defined in
security
• security: Security
Implementation of
AppConfig.security
Defined in
self_path
• self_path: string
Deprecated
use configPath or config.getConfigPath();
Implementation of
AppConfig.self_path
Defined in
serverSettings
• serverSettings: ServerSettingsConf
Defined in
server_id
• server_id: string
Implementation of
AppConfig.server_id
Defined in
storage
• storage: string
| void
Implementation of
AppConfig.storage
Defined in
uplinks
• uplinks: any
Implementation of
AppConfig.uplinks
Defined in
userRateLimit
• userRateLimit: RateLimit
Implementation of
AppConfig.userRateLimit
Defined in
user_agent
• user_agent: undefined
| string
Implementation of
AppConfig.user_agent
Defined in
users
• users: any
Defined in
Methods
checkSecretKey
▸ checkSecretKey(secret?
): string
Verify if the secret complies with the required structure
- If the secret is not provided, it will generate a new one
- For any Node.js version the new secret will be 32 characters long (to allow compatibility with modern Node.js versions)
- If the secret is provided:
- If Node.js 22 or higher, the secret must be 32 characters long thus the application will fail on startup
- If Node.js 21 or lower, the secret will be used as is but will display a deprecation warning
- If the property
security.api.migrateToSecureLegacySignature
is provided and set to true, the secret will be generated with the new signature model
Secret
external secret key
Parameters
Name | Type |
---|---|
secret? | string |
Returns
string
Implementation of
AppConfig.checkSecretKey
Defined in
getConfigPath
▸ getConfigPath(): string
Returns
string
Defined in
getMatchedPackagesSpec
▸ getMatchedPackagesSpec(pkgName
): void
| PackageAccess
Check for package spec
Parameters
Name | Type |
---|---|
pkgName | string |
Returns
void
| PackageAccess
Implementation of
AppConfig.getMatchedPackagesSpec
Defined in
getMigrateToSecureLegacySignature
▸ getMigrateToSecureLegacySignature(): boolean
Returns
boolean