Conversation
If basic auth isn't configured the node containers log Warning: The provided HTTP header '' does not look like a header? every second. Signed-off-by: Mårten Svantesson <marten.svantesson@ticket.se>
PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label |
||||||||||||||||||||||||
PR Code Suggestions ✨Explore these optional code suggestions:
|
||||||||||||
User description
Description
Don't give the -H option to curl if no BASIC_AUTH is set.
Motivation and Context
If basic auth isn't configured the node containers log
Warning: The provided HTTP header '' does not look like a header?every second.Types of changes
Checklist
PR Type
Bug fix
Description
Conditionally pass Authorization header to curl only when credentials are configured
Prevents warning messages from curl when BASIC_AUTH is not set
Uses bash array to safely handle optional curl arguments
Diagram Walkthrough
flowchart LR A["Check SE_ROUTER credentials"] --> B{Credentials configured?} B -->|Yes| C["Add Authorization header to extra_args"] B -->|No| D["extra_args remains empty"] C --> E["Pass extra_args to curl"] D --> E E --> F["Execute curl without warning"]File Walkthrough
check-grid.sh
Conditionally pass Authorization header to curlBase/check-grid.sh
extra_argsarray to conditionally store curl argumentsextra_argswith Authorization header when bothSE_ROUTER_USERNAMEandSE_ROUTER_PASSWORDare setextra_argsarray to curl command instead of always passingpotentially empty
BASIC_AUTHvariableconfigured