Closed christiaangoossens closed 3 months ago
Thanks but as you mentioned this may be a regression for others so this PR is not really acceptable. You’re also the only person to comment on the discussion so hard to know if others are affected by / care about this.
If there is interest (ie a feature request) in implementing stripping of whitespace that would probably be ok
I am sad to hear your response as I feel this fixes a bug in the original implementation, but someone else is welcome to pitch it again. I have left instructions in the discussion on how to deal with it in the meantime.
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new discussion for related concerns. See our contributing guidelines for more details.
Proposed change
The new code trims quotes ( ' and " ) and surrounding whitespace off any environment variables that are to be replaced.
This prevents a failure case of the JSON.parse() for Traefik substitution that would fail if you have accidentally added whitespace around your environment variable in Docker/Kubernetes (same for accidental quotes).
Closes discussion https://github.com/gethomepage/homepage/discussions/3535
Note that this might be a regression for those that rely on quotes or whitespace being the first or last character of an API key.
Type of change
Checklist: