I'm using Heroku to deploy my Play! framework app. I have a form that uses the standard structure of
public static void showForm() {
render();
}
public static void handleForm(@Required param, @Required otherParam, etc) {
if (validation.hasErrors()) {
validation.keep();
showForm();
} else {
//process form parameters
}
}
This works fine on:
- dev machine running HTTP at
localhost:9000
- heroku running HTTP at
www.myapp.com
- dev machine running HTTPS at
localhost:9443
However, for forms that do this on Heroku over HTTPS at secure.myapp.com
using hostname-based SSL, the validations don't show up. I think the problem is that validation.keep()
isn't working.
If validation.keep()
makes a cookie, and the problem has something to do with the difference between www.myapp.com
and secure.myapp.com
, then I might have a deeper problem because:
- I already have
application.defaultCookieDomain=.myapp.com
, as per this question. - I think that both the GET and the POST are happening over HTTPS, so I think they have the same domain anyway...
- The form's GET is definitely over HTTPS
- When the form's data is processed, its result is definitely shown over HTTPS
- I guess it's possible that the POST is happening over HTTP (and thus
www.*
instead ofsecure.*
, but I'm not sure how to check).
Anybody have any guesses as to what's going wrong?