开发者

Detecting dev mode: Set secure cookie for production, insecure for dev mode

开发者 https://www.devze.com 2023-04-03 23:27 出处:网络
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.

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

精彩评论

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