1
0
mirror of https://github.com/bingohuang/docker-labs.git synced 2025-10-04 17:33:21 +08:00

Enable use of override for session timeout in hours, fix captcha bypass bug. (#51)

* - Enable use of override for session timeout. This is more useful than having to hard-code and rebuild the code for the previous 4 hour limit. Just set environmental variable and start the app.
- Future work may involve breaking down into minutes, but this is a good minimum delivery to provide value to end-user/developer.

- Fixes bug in Captcha code by introducing new landing page. This is not a new go template, it's a separate HTML file because SRP - single reponsibility principle. Happy for this to be refacted after merging commit.

- Fix for including Docker 1.12 override has been removed for later PR.

* Merge

* Reinstate 'material' JS include'

* https for JS includes

* HTTPs for JS in bypass
This commit is contained in:
Alex Ellis
2016-11-30 18:17:18 +00:00
committed by Marcos Nils
parent d3e20724e9
commit 5eda323477
6 changed files with 78 additions and 25 deletions

View File

@@ -3,6 +3,14 @@
var app = angular.module('DockerPlay', ['ngMaterial']);
// Automatically redirects user to a new session when bypassing captcha.
// Controller keeps code/logic separate from the HTML
app.controller("BypassController", ['$scope', '$log', '$http', '$location', '$timeout', '$mdDialog', '$window', function($scope, $log, $http, $location, $timeout, $mdDialog, $window) {
setTimeout(function() {
var el = document.querySelector("#submit");
el.click();
}, 500);
}]);
app.controller('PlayController', ['$scope', '$log', '$http', '$location', '$timeout', '$mdDialog', '$window', function($scope, $log, $http, $location, $timeout, $mdDialog, $window) {
$scope.sessionId = window.location.pathname.replace('/p/', '');