Skip to content

Conversation

@ljluestc
Copy link

Add username and password configuration options to HTTP_GET and SSL_GET checks, enabling proper HTTP Basic Authentication instead of status code hacks.

Changes:

  • Added username and password fields to url_t structure
  • Implemented HTTP Basic Authentication header generation
  • Added base64 encoding of credentials using OpenSSL EVP_EncodeBlock
  • Updated configuration parsing and memory management
  • Added sample configurations demonstrating the feature

Addresses GitHub issue #2118: Authentication for HTTP_GET and SSL_GET

Example usage:
HTTP_GET {
url {
path /api/health
username monitor
password secret123
status_code 200
}
}

Add username and password configuration options to HTTP_GET and SSL_GET checks,
enabling proper HTTP Basic Authentication instead of status code hacks.

Changes:
- Added username and password fields to url_t structure
- Implemented HTTP Basic Authentication header generation
- Added base64 encoding of credentials using OpenSSL EVP_EncodeBlock
- Updated configuration parsing and memory management
- Added sample configurations demonstrating the feature

Addresses GitHub issue acassen#2118: Authentication for HTTP_GET and SSL_GET

Example usage:
HTTP_GET {
    url {
        path /api/health
        username monitor
        password secret123
        status_code 200
    }
}
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