Detecting dev mode: Set secure cookie for production, insecure for dev mode
I'm using GWT's Cookie.setCookie to set login cookies for my site. I want to make them secure cookies (my site always runs over https) but development mode can only run over http.
What's the best way to set up a switch so t开发者_C百科hat the insecure code runs in devmode and the secure code runs in production?
GWT.isProdMode()
:
/**
* Returns <code>true</code> when running in production mode. Returns
* <code>false</code> when running either in development mode, or when running
* in a plain JVM.
*/
精彩评论