Add '.' to GenericNameRegex; it cannot appear as the first or last

character. This allows its usage in a number of extra path-based
variables.

Ping #244
This commit is contained in:
Jeff Mitchell
2015-10-13 16:04:10 -04:00
parent c0f6fa88a7
commit 97820e2d77
2 changed files with 2 additions and 1 deletions

View File

@@ -11,7 +11,7 @@ import (
// Helper which returns a generic regex string for creating endpoint patterns
// that are identified by the given name in the backends
func GenericNameRegex(name string) string {
return fmt.Sprintf("(?P<%s>\\w[\\w-]+\\w)", name)
return fmt.Sprintf("(?P<%s>\\w[\\w-.]+\\w)", name)
}
// PathAppend is a helper for appending lists of paths into a single