Commit 9fdefc84 authored by Dominik Rosiek's avatar Dominik Rosiek

Merge branch 'master' of gitlab.telemabk.pl:jifwin/CTF

parents ada7fde6 da59c9b5
......@@ -94,4 +94,4 @@ module.exports = function (grunt) {
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.registerTask('default', ['clean', 'jshint', 'copy', 'htmlmin', 'cssmin', 'uglify']);
};
\ No newline at end of file
};
......@@ -4,7 +4,7 @@ server:
- type: http
port: 8080
dbHost: 57.37.192.46
dbHost: 92f653f4-cf83-4801-8475-cd748954c3b6.node.dockerapp.io
dbPort: 27017
dbName: db
......
......@@ -4,12 +4,12 @@ server:
- type: http
port: 8080
dbHost: 52.37.192.46
dbHost: 52.58.79.68
dbPort: 27017
dbName: db
startupConfiguration:
domainName: "52.25.28.64"
domainName: "52.28.244.24"
port: 8080
schema: "http"
......@@ -113,7 +113,7 @@ textTasks:
webTasks:
- name: "SQL Injection"
url: "http://google.pl"
url: "http://52.29.190.67"
level: 3
flags:
- value: "AGH_sdfg1fs"
......
configuration.prod.yml
\ No newline at end of file
......@@ -6,7 +6,6 @@ import com.telephoners.krakyournet.ctf.beans.User;
import com.telephoners.krakyournet.ctf.core.ApplicationConfiguration;
import com.telephoners.krakyournet.ctf.repositories.TeamsRepository;
import io.dropwizard.auth.Auth;
import org.apache.commons.io.FileUtils;
import javax.inject.Inject;
import javax.inject.Singleton;
......@@ -16,7 +15,6 @@ import javax.ws.rs.Produces;
import javax.ws.rs.core.HttpHeaders;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import java.io.File;
import java.io.IOException;
@Singleton
......@@ -24,6 +22,7 @@ import java.io.IOException;
@Produces(MediaType.APPLICATION_JSON)
public class UtilResource
{
private static String redirectHtml = "<!DOCTYPE html><html lang=\"en\" ng-app=\"ctfApp\"><head></head><script type=\"text/javascript\">window.location = \"http://\" + window.location.host;</script></html>";
private final TeamsRepository teamsRepository;
private final ApplicationConfiguration applicationConfiguration;
......@@ -65,7 +64,6 @@ public class UtilResource
@Path("/auth")
public Response auth(@Auth User user) throws IOException
{
String redirectHtml = new String(FileUtils.readFileToByteArray(new File("service/src/main/resources/assets/redirect.html")));
return Response.ok()
.entity(redirectHtml)
.header(HttpHeaders.CONTENT_TYPE, "text/html")
......
<!DOCTYPE html>
<html lang="en" ng-app="ctfApp">
<head>
</head>
<script type="text/javascript">
window.location = "http://" + window.location.host;
</script>
</body>
</html>
......@@ -13,7 +13,7 @@
$location.path('/');
AuthenticationService.setCredentials($scope.username, $scope.password, response.team);
// redirect to additional external auth point
$window.location.href = "http://"+$scope.username+":"+$scope.password+"@52.25.28.64/:8080/api/v1/auth";
$window.location.href = "http://"+$scope.username+":"+$scope.password+"@52.28.244.24:8080/api/v1/auth";
} else {
Materialize.toast('Błąd logowania! Spróbuj jeszcze raz.', 5000 ,'toast-error');
$scope.dataLoading = false;
......@@ -23,4 +23,4 @@
}]);
})();
\ No newline at end of file
})();
......@@ -38,7 +38,7 @@
}]);
app.factory('AppSettings', function() {
var dev = "localhost:8080/api/v1", prod = "52.25.28.64:8080/api/v1";
var dev = "localhost:8080/api/v1", prod = "52.28.244.24:8080/api/v1";
return {
apiAddress: prod
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment