More fixes for https support.
This commit is contained in:
@@ -16,7 +16,11 @@ import play.api.mvc._
|
||||
class Application @Inject() (store: LobbyStore) extends Controller {
|
||||
|
||||
def index() = Action { request =>
|
||||
Ok(views.html.massivedecks.index(if (request.secure) { "https" } else { "http" } + "://" + request.host))
|
||||
val protocol = request.headers.get("X-Forwarded-Proto") match {
|
||||
case Some(protocol) => protocol
|
||||
case None => if (request.secure) { "https" } else { "http" }
|
||||
}
|
||||
Ok(views.html.massivedecks.index(protocol + "://" + request.host))
|
||||
}
|
||||
|
||||
def createLobby() = Action {
|
||||
|
||||
@@ -1,16 +1,14 @@
|
||||
name := "cah"
|
||||
name := "massivedecks"
|
||||
|
||||
version := "1.0-SNAPSHOT"
|
||||
|
||||
lazy val root = (project in file(".")).enablePlugins(PlayScala)
|
||||
|
||||
scalaVersion := "2.11.6"
|
||||
scalaVersion := "2.11.8"
|
||||
|
||||
libraryDependencies ++= Seq(
|
||||
jdbc,
|
||||
cache,
|
||||
ws,
|
||||
specs2 % Test
|
||||
ws
|
||||
)
|
||||
|
||||
resolvers += "scalaz-bintray" at "http://dl.bintray.com/scalaz/releases"
|
||||
|
||||
+1
-45
@@ -1,50 +1,6 @@
|
||||
# This is the main configuration file for the application.
|
||||
# ~~~~~
|
||||
|
||||
# Secret key
|
||||
# ~~~~~
|
||||
# The secret key is used to secure cryptographics functions.
|
||||
#
|
||||
# This must be changed for production, but we recommend not changing it in this file.
|
||||
#
|
||||
# See http://www.playframework.com/documentation/latest/ApplicationSecret for more details.
|
||||
play.crypto.secret = "changeme"
|
||||
play.crypto.secret=${?APPLICATION_SECRET}
|
||||
|
||||
# The application languages
|
||||
# ~~~~~
|
||||
play.i18n.langs = [ "en" ]
|
||||
|
||||
play.modules.enabled += "controllers.massivedecks.CoreModule"
|
||||
|
||||
play.akka.actor-system = "massivedecks"
|
||||
akka.actor.default-dispatcher.fork-join-executor.parallelism-max = 64
|
||||
akka.actor.debug.receive = on
|
||||
|
||||
# Router
|
||||
# ~~~~~
|
||||
# Define the Router object to use for this application.
|
||||
# This router will be looked up first when the application is starting up,
|
||||
# so make sure this is the entry point.
|
||||
# Furthermore, it's assumed your route file is named properly.
|
||||
# So for an application router like `my.application.Router`,
|
||||
# you may need to define a router file `conf/my.application.routes`.
|
||||
# Default to Routes in the root package (and conf/routes)
|
||||
# play.http.router = my.application.Routes
|
||||
|
||||
# Database configuration
|
||||
# ~~~~~
|
||||
# You can declare as many datasources as you want.
|
||||
# By convention, the default datasource is named `default`
|
||||
#
|
||||
# db.default.driver=org.h2.Driver
|
||||
# db.default.url="jdbc:h2:mem:play"
|
||||
# db.default.username=sa
|
||||
# db.default.password=""
|
||||
|
||||
# Evolutions
|
||||
# ~~~~~
|
||||
# You can disable evolutions if needed
|
||||
# play.evolutions.enabled=false
|
||||
|
||||
# You can disable evolutions for a specific datasource if necessary
|
||||
# play.evolutions.db.default.enabled=false
|
||||
|
||||
Reference in New Issue
Block a user