Skip to content

Commit

Permalink
cors problem check
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Osypenko (Partner) authored and Daniel Osypenko (Partner) committed Jul 30, 2020
1 parent 2b8f634 commit dc1b517
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/main/java/com/moto/safezone/controller/CheckController.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
package com.moto.safezone.controller;

import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@CrossOrigin(origins = "*", allowedHeaders = "*", allowCredentials = "true")
@RestController
public class CheckController {

Expand All @@ -11,8 +13,15 @@ public class CheckController {
public String getHello() {
return "hello world";
}

@GetMapping("/res")
public String getRestricted() {
return "restrincted";
return "restrincted get";
}

@GetMapping("/res-pos")
public String getRestrictedPost() {
return "restrincted post";
}

}

0 comments on commit dc1b517

Please sign in to comment.