Skip to content

refactor(config): centralize configuration#12

Merged
mroderick merged 1 commit intomainfrom
feature/config-centralization
Apr 19, 2026
Merged

refactor(config): centralize configuration#12
mroderick merged 1 commit intomainfrom
feature/config-centralization

Conversation

@mroderick
Copy link
Copy Markdown
Collaborator

@mroderick mroderick commented Apr 19, 2026

Summary

Centralizes all config in config.js per Till's review comments on PR #10.

  • Add CODEBAR_AUTH_URL for OAuth callback URL
  • Add wildcard redirect support (*.codebar.io patterns)
  • Add unit tests for redirect validation (15 tests)

Changes

File Change
src/config.js Add base_url
src/auth.js Use base_url from config
src/app/utils/redirect.js Add glob matching for wildcards
src/index.js Use base_url in startup log
test/unit/redirect.test.js New test file

Env Vars

Variable Description
CODEBAR_AUTH_URL OAuth callback URL (required for production)

Blocks

PR #10 (Heroku deployment)

@mroderick mroderick marked this pull request as draft April 19, 2026 18:52
@mroderick mroderick force-pushed the feature/config-centralization branch 2 times, most recently from 7eb9898 to e892bb3 Compare April 19, 2026 18:58
- Add CODEBAR_AUTH_URL for OAuth callback (not BETTER_AUTH_URL)
- Add wildcard support in redirect validation
- Add unit tests for redirect validation (15 tests, 93% coverage)
- Remove unused host config (not used for server binding)
@mroderick mroderick force-pushed the feature/config-centralization branch from e892bb3 to 326ffc4 Compare April 19, 2026 19:11
@mroderick mroderick marked this pull request as ready for review April 19, 2026 19:14
@mroderick mroderick requested a review from till April 19, 2026 19:14
@mroderick mroderick merged commit c13db24 into main Apr 19, 2026
5 checks passed
@mroderick mroderick deleted the feature/config-centralization branch April 19, 2026 20:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants