mirror of
https://github.com/Frooodle/Stirling-PDF.git
synced 2025-08-11 13:48:37 +02:00
fix for param removal
This commit is contained in:
parent
1d1522bd7a
commit
3cc6bf4c6c
@ -36,9 +36,15 @@ public class CleanUrlInterceptor implements HandlerInterceptor {
|
|||||||
public boolean preHandle(
|
public boolean preHandle(
|
||||||
HttpServletRequest request, HttpServletResponse response, Object handler)
|
HttpServletRequest request, HttpServletResponse response, Object handler)
|
||||||
throws Exception {
|
throws Exception {
|
||||||
|
String requestURI = request.getRequestURI();
|
||||||
|
|
||||||
|
// Skip URL cleaning for API endpoints - they need their own parameter handling
|
||||||
|
if (requestURI.contains("/api/")) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
String queryString = request.getQueryString();
|
String queryString = request.getQueryString();
|
||||||
if (queryString != null && !queryString.isEmpty()) {
|
if (queryString != null && !queryString.isEmpty()) {
|
||||||
String requestURI = request.getRequestURI();
|
|
||||||
Map<String, String> allowedParameters = new HashMap<>();
|
Map<String, String> allowedParameters = new HashMap<>();
|
||||||
|
|
||||||
// Keep only the allowed parameters
|
// Keep only the allowed parameters
|
||||||
|
Loading…
Reference in New Issue
Block a user