-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Labels
enhancementNew feature or requestNew feature or request
Description
A normal htaccess file looks like this:
user1:ajdkahsdakdjshakd
user2:akjshdkasjdhadkjsh
In the htaccess.json read by the Lambda function, it needs to look like this:
{
"htpasswd": "foobar:$2y$05$1h9cwwFusLcZCIUpdM7Gke.ei1E2QV6ORH/ZmvbR4h2tDGHb7q8lW\nzeebaa:$2y$05$aWBOi47GEOOoNB/ZUgdPY.NukDalyc.Bvn.S0aOlKDD9wp0R9mQHm",
...
}But in the JSON, this will fail:
{
"htpasswd": "foobar:$2y$05$1h9cwwFusLcZCIUpdM7Gke.ei1E2QV6ORH/ZmvbR4h2tDGHb7q8lW
zeebaa:$2y$05$aWBOi47GEOOoNB/ZUgdPY.NukDalyc.Bvn.S0aOlKDD9wp0R9mQHm",
...
}Originally I wanted to do this:
{
"htpasswd": "${file("htaccess")}",
...
}But this problem prevents a direct substitution of the htaccess text and the JSON. The workaround is:
{
"htpasswd": "${replace(file("htaccess"),"\n","\\n")}",
...
}Can we make the function less whitespace-fussy by allowing linebreaks in addition to \n?
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request