Move escapeLocationPathVar to escapeLiteralDollar

This commit is contained in:
Bryan Shelton 2018-10-09 12:58:50 -07:00
parent 3dc131bd57
commit 3686e4f366
3 changed files with 22 additions and 9 deletions

View file

@ -120,7 +120,7 @@ var (
}
return true
},
"escapeLocationPathVar": escapeLocationPathVar,
"escapeLiteralDollar": escapeLiteralDollar,
"shouldConfigureLuaRestyWAF": shouldConfigureLuaRestyWAF,
"buildLuaSharedDictionaries": buildLuaSharedDictionaries,
"buildLocation": buildLocation,
@ -162,13 +162,13 @@ var (
}
)
// escapeLocationPathVar will replace the $ character with ${literal_dollar}
// escapeLiteralDollar will replace the $ character with ${literal_dollar}
// which is made to work via the following configuration in the http section of
// the template:
// geo $literal_dollar {
// default "$";
// }
func escapeLocationPathVar(input interface{}) string {
func escapeLiteralDollar(input interface{}) string {
inputStr, ok := input.(string)
if !ok {
return ""