changed some configurations for https
This commit is contained in:
parent
6f4789fff0
commit
8c647b0b09
@ -109,7 +109,8 @@ module.exports = function (ctx) {
|
|||||||
},
|
},
|
||||||
env: ctx.dev
|
env: ctx.dev
|
||||||
? { // Base URL for API-Calls: DEV
|
? { // Base URL for API-Calls: DEV
|
||||||
API: JSON.stringify('http://localhost:8080')
|
//API: JSON.stringify('http://localhost:8080')
|
||||||
|
API: JSON.stringify('https://seserver.se.hs-heilbronn.de:8443/buga19geocaching')
|
||||||
}
|
}
|
||||||
: { // Base URL for API-Calls: PRODUCTION (build)
|
: { // Base URL for API-Calls: PRODUCTION (build)
|
||||||
//API: JSON.stringify('http://seserver.se.hs-heilbronn.de:9080/buga19geocaching')
|
//API: JSON.stringify('http://seserver.se.hs-heilbronn.de:9080/buga19geocaching')
|
||||||
|
|||||||
@ -96,7 +96,7 @@
|
|||||||
|
|
||||||
console.log("GET /api/login/ - json: " + JSON.stringify(data));
|
console.log("GET /api/login/ - json: " + JSON.stringify(data));
|
||||||
|
|
||||||
this.$axios.post('http://www.se.hs-heilbronn.de:8090/buga19usermanagement/account/login', data)
|
this.$axios.post('https://seserver.se.hs-heilbronn.de:8443/buga19usermanagement/account/login', data)
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
console.log("GET/POST /api/login/ - response: ");
|
console.log("GET/POST /api/login/ - response: ");
|
||||||
console.log(response.data);
|
console.log(response.data);
|
||||||
|
|||||||
@ -270,10 +270,16 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
continueCache(cacheID) {
|
continueCache(cacheID) {
|
||||||
},
|
let currentCache;
|
||||||
validateEmail(email) {
|
let params;
|
||||||
let re = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
|
|
||||||
return re.test(String(email).toLowerCase());
|
this.$axios.get('/api/currentStation', {params})
|
||||||
|
.then((response) => {
|
||||||
|
})
|
||||||
|
.catch((error) => {
|
||||||
|
});
|
||||||
|
|
||||||
|
this.$router.push({path: `/station/${cacheID}`})
|
||||||
},
|
},
|
||||||
getPersonalRanking() {
|
getPersonalRanking() {
|
||||||
const name = JSON.parse(localStorage.getItem('userToken')).name;
|
const name = JSON.parse(localStorage.getItem('userToken')).name;
|
||||||
|
|||||||
@ -53,7 +53,7 @@ public class Controller {
|
|||||||
fetchPublicKey();
|
fetchPublicKey();
|
||||||
}
|
}
|
||||||
|
|
||||||
@CrossOrigin(origins = "http://localhost:8081") // only for dev purpose
|
@CrossOrigin(origins = "*", allowedHeaders = "*") // only for dev purpose
|
||||||
@RequestMapping("/api/allCaches")
|
@RequestMapping("/api/allCaches")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public ResponseEntity getAllCaches() {
|
public ResponseEntity getAllCaches() {
|
||||||
@ -61,7 +61,7 @@ public class Controller {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@CrossOrigin(origins = "http://localhost:8081") // only for dev purpose
|
@CrossOrigin(origins = "*", allowedHeaders = "*") // only for dev purpose
|
||||||
@RequestMapping("/api/startCache")
|
@RequestMapping("/api/startCache")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public ResponseEntity startCache(@RequestParam(value = "token", defaultValue = "-1") String token,
|
public ResponseEntity startCache(@RequestParam(value = "token", defaultValue = "-1") String token,
|
||||||
@ -143,7 +143,7 @@ public class Controller {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@CrossOrigin(origins = "http://localhost:8081") // only for dev purpose
|
@CrossOrigin(origins = "*", allowedHeaders = "*") // only for dev purpose
|
||||||
@RequestMapping("/api/checkStation")
|
@RequestMapping("/api/checkStation")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public ResponseEntity checkStation(@RequestParam String token,
|
public ResponseEntity checkStation(@RequestParam String token,
|
||||||
@ -291,14 +291,14 @@ public class Controller {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@CrossOrigin(origins = "http://localhost:8081") // only for dev purpose
|
@CrossOrigin(origins = "*", allowedHeaders = "*") // only for dev purpose
|
||||||
@RequestMapping("/api/createCache")
|
@RequestMapping("/api/createCache")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public ResponseEntity createCache(@RequestBody Cache cache) {
|
public ResponseEntity createCache(@RequestBody Cache cache) {
|
||||||
return createCacheUtil(cache);
|
return createCacheUtil(cache);
|
||||||
}
|
}
|
||||||
|
|
||||||
@CrossOrigin(origins = "http://localhost:8081") // only for dev purpose
|
@CrossOrigin(origins = "*", allowedHeaders = "*") // only for dev purpose
|
||||||
@RequestMapping("/api/checkAdmin")
|
@RequestMapping("/api/checkAdmin")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public ResponseEntity checkAdmin(@RequestParam String token) {
|
public ResponseEntity checkAdmin(@RequestParam String token) {
|
||||||
@ -329,14 +329,14 @@ public class Controller {
|
|||||||
return ResponseEntity.status(401).body(false);
|
return ResponseEntity.status(401).body(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@CrossOrigin(origins = "http://localhost:8081") // only for dev purpose
|
@CrossOrigin(origins = "*", allowedHeaders = "*") // only for dev purpose
|
||||||
@RequestMapping("/api/getAllStations")
|
@RequestMapping("/api/getAllStations")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public ResponseEntity getAllStations() {
|
public ResponseEntity getAllStations() {
|
||||||
return ResponseEntity.status(200).body(new Gson().toJson(stationRepository.findAll()));
|
return ResponseEntity.status(200).body(new Gson().toJson(stationRepository.findAll()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@CrossOrigin(origins = "http://localhost:8081") // only for dev purpose
|
@CrossOrigin(origins = "*", allowedHeaders = "*") // only for dev purpose
|
||||||
@RequestMapping("/api/deleteCache")
|
@RequestMapping("/api/deleteCache")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public ResponseEntity deleteCache(@RequestParam String cacheID) {
|
public ResponseEntity deleteCache(@RequestParam String cacheID) {
|
||||||
@ -344,7 +344,7 @@ public class Controller {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@CrossOrigin(origins = "http://localhost:8081") // only for dev purpose
|
@CrossOrigin(origins = "*", allowedHeaders = "*") // only for dev purpose
|
||||||
@RequestMapping("/api/getMyCaches")
|
@RequestMapping("/api/getMyCaches")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public ResponseEntity getMyCaches(@RequestParam String token) {
|
public ResponseEntity getMyCaches(@RequestParam String token) {
|
||||||
@ -380,7 +380,7 @@ public class Controller {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@CrossOrigin(origins = "http://localhost:8081") // only for dev purpose
|
@CrossOrigin(origins = "*", allowedHeaders = "*") // only for dev purpose
|
||||||
@RequestMapping("/api/getRankingList")
|
@RequestMapping("/api/getRankingList")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public ResponseEntity getRankingList() {
|
public ResponseEntity getRankingList() {
|
||||||
@ -395,7 +395,7 @@ public class Controller {
|
|||||||
return ResponseEntity.status(200).body(new Gson().toJson(sendBackUsers));
|
return ResponseEntity.status(200).body(new Gson().toJson(sendBackUsers));
|
||||||
}
|
}
|
||||||
|
|
||||||
@CrossOrigin(origins = "http://localhost:8081") // only for dev purpose
|
@CrossOrigin(origins = "*", allowedHeaders = "*") // only for dev purpose
|
||||||
@RequestMapping("/api/getTeamRankingList")
|
@RequestMapping("/api/getTeamRankingList")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public ResponseEntity getTeamRankingList() {
|
public ResponseEntity getTeamRankingList() {
|
||||||
@ -410,7 +410,7 @@ public class Controller {
|
|||||||
return ResponseEntity.status(200).body(new Gson().toJson(sendBackTeams));
|
return ResponseEntity.status(200).body(new Gson().toJson(sendBackTeams));
|
||||||
}
|
}
|
||||||
|
|
||||||
@CrossOrigin(origins = "http://localhost:8081") // only for dev purpose
|
@CrossOrigin(origins = "*", allowedHeaders = "*") // only for dev purpose
|
||||||
@RequestMapping("/api/getUser")
|
@RequestMapping("/api/getUser")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public ResponseEntity getUser(@RequestParam String token) {
|
public ResponseEntity getUser(@RequestParam String token) {
|
||||||
@ -438,7 +438,7 @@ public class Controller {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@CrossOrigin(origins = "http://localhost:8081") // only for dev purpose
|
@CrossOrigin(origins = "*", allowedHeaders = "*") // only for dev purpose
|
||||||
@RequestMapping("/api/createTeam")
|
@RequestMapping("/api/createTeam")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public ResponseEntity createTeam(@RequestParam String token,
|
public ResponseEntity createTeam(@RequestParam String token,
|
||||||
@ -485,7 +485,7 @@ public class Controller {
|
|||||||
return ResponseEntity.status(200).body(new Gson().toJson(team));
|
return ResponseEntity.status(200).body(new Gson().toJson(team));
|
||||||
}
|
}
|
||||||
|
|
||||||
@CrossOrigin(origins = "http://localhost:8081") // only for dev purpose
|
@CrossOrigin(origins = "*", allowedHeaders = "*") // only for dev purpose
|
||||||
@RequestMapping("/api/joinTeam")
|
@RequestMapping("/api/joinTeam")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public ResponseEntity joinTeam(@RequestParam String token,
|
public ResponseEntity joinTeam(@RequestParam String token,
|
||||||
@ -546,7 +546,7 @@ public class Controller {
|
|||||||
return ResponseEntity.status(200).body(team);
|
return ResponseEntity.status(200).body(team);
|
||||||
}
|
}
|
||||||
|
|
||||||
@CrossOrigin(origins = "http://localhost:8081") // only for dev purpose
|
@CrossOrigin(origins = "*", allowedHeaders = "*") // only for dev purpose
|
||||||
@RequestMapping("/api/leaveTeam")
|
@RequestMapping("/api/leaveTeam")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public ResponseEntity leaveTeam(@RequestParam String token) {
|
public ResponseEntity leaveTeam(@RequestParam String token) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user