Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[#11164] Change /api prefix to /api-publicfor serverTime and error pages #11165

Merged
merged 1 commit into from
Jun 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion web-starter/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ spring:
server:
port: 8080
error:
path: /api/error
path: /api-public/error
include-exception: true
include-message: always
include-binding-errors: always
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
* @author netspider
*/
@RestController
@RequestMapping("/api")
@Validated
public class MainController {

Expand All @@ -65,7 +64,7 @@ public MainController(
this.cacheService = Objects.requireNonNull(cacheService, "cacheService");
}

@GetMapping(value = "/applications")
@GetMapping(value = "/api/applications")
public ResponseEntity<ApplicationGroup> getApplicationGroup(
@RequestHeader(value = "If-None-Match", required = false) @NullOrNotBlank String eTagHeader,
@RequestParam(value = "clearCache", required = false) @NullOrNotBlank String clearCache
Expand Down Expand Up @@ -139,7 +138,7 @@ private static boolean needClearCache(ETag eTag, String clearCache) {
return eTag == null || clearCache != null;
}

@GetMapping(value = "/serverTime")
@GetMapping(value = {"/api/serverTime", "/api-public/serverTime"})
public ServerTime getServerTime() {
return new ServerTime();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
import java.net.URISyntaxException;

@RestController
@RequestMapping(value={"/api/error"})
@RequestMapping(value={"/api-public/error"})
@Validated
public class NonWhiteLabelErrorController extends AbstractErrorController {
private final ErrorProperties errorProperties;
Expand Down