Search code examples
cookiesplayframeworkproduction

How to start unsecured Play Server in Production mode


I'm developing a web server using Play Framework v2.5. It will run in intranet and will use HTTP, not HTTPS.

When I start Play Server in Development Mode, it works.

But in Production Mode Play Server sets Secure flag to Session Cookie.

Since connection uses HTTP and not HTTPS browser doesn't send Session Cookie and users cannot login.

How can I disable this feature and avoid setting Secure to Cookies in Play Production Mode?


Solution

  • Try to set play.http.session.secure=false in your application.conf file, or in the command line:

    $ yourapp/bin/yourapp -Dplay.http.session.secure=false