Skip to content

Feat auth header traefik #892

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed

Conversation

thibaut1304
Copy link
Contributor

@thibaut1304 thibaut1304 commented Mar 19, 2025

Description

Added support for BasicAuth authentication for the Traefik service.

πŸ“Œ Issue :
Currently, Homer does not allow sending an Authorization header to authenticate with Traefik.

βœ… Solution :

  • Checks if this.item.basic_auth is defined.
  • Encode credentials in Base64 (btoa(user:password)).
  • Adds the Authorization: Basic ... header to Traefik API requests.

πŸ”₯ Motivation :
Allows Traefik status to be correctly displayed even if authentication is required.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • I've read & comply with the contributing guidelines
  • I have tested my code for new features & regressions on both mobile & desktop devices, using the latest version of major browsers.
  • I have made corresponding changes to the documentation (README.md).
  • I've checked my modifications for any breaking changes, especially in the config.yml file

@thibaut1304
Copy link
Contributor Author

I forgot to mention in my PR that I also updated the documentation for the Traefik service in docs/customservices.md. This update explains how to configure Basic Auth in the config.yml file to authenticate requests.

@thibaut1304 thibaut1304 force-pushed the fix-auth-header-traefik branch from 0822680 to 22de73c Compare April 2, 2025 15:00
@thibaut1304 thibaut1304 force-pushed the fix-auth-header-traefik branch from 22de73c to 0822680 Compare July 2, 2025 10:44
@thibaut1304 thibaut1304 mentioned this pull request Jul 2, 2025
7 tasks
@thibaut1304
Copy link
Contributor Author

Closing in favor of #948 , which contains the same feature in a cleaner commit history.

@thibaut1304 thibaut1304 closed this Jul 2, 2025
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.

1 participant