Skip to content

[Refactor]: Improve configuration loading #32

Open
finos/git-proxy
#998
@jescalada

Description

@jescalada

Is your feature request related to a problem? Please describe.
Currently, the app's configuration is set in proxy.config.json, which may cause these problems:

  • undefined errors caused by missing entries
  • Type errors due to non-normalized schemas for arrays/objects (for example, auth methods all have unique properties, which should be typed and normalized)

Describe the solution you'd like
I think a good solution would be to keep the configuration in a TS file, and load it from there. I believe this would cause breaking changes to current users, so we would have to discuss if bumping up the git-proxy version is possible/desirable or if we could have a hybrid solution instead.

Describe alternatives you've considered
Using environment variables, but that's sadly unrealistic because of the complexity of the config.

Additional context
Working with adding new auth methods (#30, #24) made me realize that this is necessary to make sure users can have auth methods without things blowing up due to missing or malformed config files.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions