diff options
author | Duarte Meneses <duarte.meneses@sonarsource.com> | 2023-05-02 13:44:15 -0500 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2023-05-03 20:02:58 +0000 |
commit | e0202e205709f1b06b56f7f108b12476860412d4 (patch) | |
tree | 97c1390c94211346e23ef8e1c479b8d8c5cbf84b /server/sonar-webserver | |
parent | 0f7a9234de7d0601f17d48ca0b16c270f1da380c (diff) | |
download | sonarqube-e0202e205709f1b06b56f7f108b12476860412d4.tar.gz sonarqube-e0202e205709f1b06b56f7f108b12476860412d4.zip |
SONAR-19014 Don't rely on plugin APIs list of static resources
Diffstat (limited to 'server/sonar-webserver')
-rw-r--r-- | server/sonar-webserver/src/main/java/org/sonar/server/platform/web/WebPagesFilter.java | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/server/sonar-webserver/src/main/java/org/sonar/server/platform/web/WebPagesFilter.java b/server/sonar-webserver/src/main/java/org/sonar/server/platform/web/WebPagesFilter.java index 5e32a354f14..39921faf724 100644 --- a/server/sonar-webserver/src/main/java/org/sonar/server/platform/web/WebPagesFilter.java +++ b/server/sonar-webserver/src/main/java/org/sonar/server/platform/web/WebPagesFilter.java @@ -36,7 +36,7 @@ import static java.nio.charset.StandardCharsets.UTF_8; import static java.util.Locale.ENGLISH; import static java.util.Objects.requireNonNull; import static org.apache.commons.io.IOUtils.write; -import static org.sonar.api.web.ServletFilter.UrlPattern.Builder.staticResourcePatterns; +import static org.sonar.api.impl.ws.StaticResources.patterns; import static org.sonarqube.ws.MediaTypes.HTML; /** @@ -50,7 +50,7 @@ public class WebPagesFilter implements Filter { private static final ServletFilter.UrlPattern URL_PATTERN = ServletFilter.UrlPattern .builder() - .excludes(staticResourcePatterns()) + .excludes(patterns()) .excludes("/api/v2/*") .build(); @@ -60,8 +60,7 @@ public class WebPagesFilter implements Filter { this(PlatformImpl.getInstance().getContainer().getComponentByType(WebPagesCache.class)); } - @VisibleForTesting - WebPagesFilter(WebPagesCache webPagesCache) { + @VisibleForTesting WebPagesFilter(WebPagesCache webPagesCache) { this.webPagesCache = webPagesCache; } |