Skip to content

Commit

Permalink
Only explicitly return the stylesheet in WadlGenerator and not other …
Browse files Browse the repository at this point in the history
…URLs
  • Loading branch information
coheigea committed Mar 15, 2024
1 parent 25b191b commit 1dbfeee
Showing 1 changed file with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -243,9 +243,17 @@ protected void doFilter(ContainerRequestContext context, Message m) {
if (path.startsWith("/") && !path.isEmpty()) {
path = path.substring(1);
}
if (stylesheetReference != null && path.endsWith(".xsl")
|| docLocationMap.containsKey(path)) {

if (docLocationMap.containsKey(path)) {
context.abortWith(getExistingResource(m, ui, path));
} else if (stylesheetReference != null) {
String theStylesheetReference = stylesheetReference;
if (theStylesheetReference.startsWith("/")) {
theStylesheetReference = theStylesheetReference.substring(1);
}
if (path.endsWith(theStylesheetReference)) {
context.abortWith(getExistingResource(m, ui, theStylesheetReference));
}
}
}
return;
Expand Down

0 comments on commit 1dbfeee

Please sign in to comment.