Fix for bug where the server would give the incorrect URL if accessed via HTTPs.

This commit is contained in:
Gareth Latty
2016-05-22 19:02:15 +01:00
parent 5324b959d1
commit 8217f84e38
2 changed files with 4 additions and 3 deletions
@@ -15,8 +15,8 @@ import play.api.mvc._
class Application @Inject() (store: LobbyStore) extends Controller {
def index() = Action { implicit request =>
Ok(views.html.massivedecks.index(routes.Application.index().absoluteURL()))
def index() = Action { request =>
Ok(views.html.massivedecks.index(if (request.secure) { "https" } else { "http" } + "://" + request.host))
}
def createLobby() = Action {
+2 -1
View File
@@ -13,7 +13,8 @@
<link rel="stylesheet" href="@routes.Assets.versioned("stylesheets/massivedecks.css")">
<script src="@routes.Assets.versioned("javascripts/util.js")"></script>
<script src="@routes.Assets.versioned("javascripts/lib/qrcode.min.js")"></script>
<link rel="icon" sizes="192x192" href="@routes.Assets.versioned("images/icon.png")">
<link rel="shortcut icon" sizes="192x192" type="image/x-icon" href="@routes.Assets.versioned("images/icon.png")">
<link rel="canonical" href="@url/">
<link rel="manifest" href="@routes.Assets.versioned("manifest.json")">
</head>
<body>