如何在Playframework中使用https而不是http [英] how to use https instead of http in playframework

查看:289
本文介绍了如何在Playframework中使用https而不是http的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在我的播放应用程序中仅使用https端口.我已在命令行参数中成功添加-Dhttps.port = 9043,并使用默认的http = 9000和https = 9043这两个端口开始播放.如何配置播放以停止使用http端口?

I would like to use only https port in my play application. I've successfully added -Dhttps.port=9043 in command line parameters and play started using two ports default http=9000 and https=9043. How to configure play to stop using http port?

推荐答案

在Play 2.x中,将http.port设置为disabled而不是提供端口号:

In Play 2.x, set http.port to disabled instead of providing a port number:

./start -Dhttp.port=disabled -Dhttps.port=9043 # (...) 

配置HTTPS-关闭HTTP

这篇关于如何在Playframework中使用https而不是http的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆