How do I ignore ssl validation in play framework scala ws calls

萝らか妹 提交于 2019-12-05 15:56:34

In your application.conf add the below line

ws.acceptAnyCertificate=true

By the way, if you going to user play2 as a lib, to allow self-signed ssl certificates you should do the following(2.1.3 as actual version):

  • create conf/application.conf with at least one string

    ws.acceptAnyCertificate=true

  • create new application

    val app = new play.api.DefaultApplication(new File("."), this.getClass.getClassLoader(), None, play.api.Mode.Dev)

  • start new app

    play.api.Play.start(app)

  • do ws calls to https resources

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!