RoutesFilter - Ability to define or modify variables in validate method #107

codeconsole opened this Issue Jan 26, 2012 · 0 comments

1 participant


For example, if you wanted to redirect all appspot requests to an owned domain:

all "@path", validate: {
    var mydomain = ""
}, redirect:  "https://@mydomain@path"

Obviously the setting of the var would be more dynamic in real life. For example, I have a filter that sets my dynamic properties in the request scope. So I could say:

var mydomain = request.mydomain
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment