mirror of
https://github.com/Stirling-Tools/Stirling-PDF.git
synced 2025-08-02 10:35:22 +00:00
fix and clean
This commit is contained in:
parent
0fc79ff9ba
commit
0b075f872e
@ -39,6 +39,11 @@ public class CleanUrlInterceptor implements HandlerInterceptor {
|
||||
String queryString = request.getQueryString();
|
||||
if (queryString != null && !queryString.isEmpty()) {
|
||||
String requestURI = request.getRequestURI();
|
||||
|
||||
if (requestURI.contains("/api/")) {
|
||||
return true;
|
||||
}
|
||||
|
||||
Map<String, String> allowedParameters = new HashMap<>();
|
||||
|
||||
// Keep only the allowed parameters
|
||||
|
@ -110,14 +110,14 @@ public class ConfigController {
|
||||
}
|
||||
|
||||
@GetMapping("/endpoint-enabled")
|
||||
public ResponseEntity<Boolean> isEndpointEnabled(@RequestParam String endpoint) {
|
||||
public ResponseEntity<Boolean> isEndpointEnabled(@RequestParam(name = "endpoint") String endpoint) {
|
||||
boolean enabled = endpointConfiguration.isEndpointEnabled(endpoint);
|
||||
return ResponseEntity.ok(enabled);
|
||||
}
|
||||
|
||||
@GetMapping("/endpoints-enabled")
|
||||
public ResponseEntity<Map<String, Boolean>> areEndpointsEnabled(
|
||||
@RequestParam String endpoints) {
|
||||
@RequestParam(name = "endpoints") String endpoints) {
|
||||
Map<String, Boolean> result = new HashMap<>();
|
||||
String[] endpointArray = endpoints.split(",");
|
||||
for (String endpoint : endpointArray) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user