开发者

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.
   */
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜