aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-plugin-api
diff options
context:
space:
mode:
authorGrégoire Aubert <gregoire.aubert@sonarsource.com>2018-03-06 17:41:23 +0100
committerSonarTech <sonartech@sonarsource.com>2018-03-26 20:20:57 +0200
commitcb0a23c978efcc296cf29837c9e6e1a657403404 (patch)
tree7e408a33f49254e99e47753c9d7b272c269c53c6 /sonar-plugin-api
parentb4125add7a55db6d2dc71a1bd0b2cadbe5ff7887 (diff)
downloadsonarqube-cb0a23c978efcc296cf29837c9e6e1a657403404.tar.gz
sonarqube-cb0a23c978efcc296cf29837c9e6e1a657403404.zip
VSTS-141 Add VSTS Quality widget
Diffstat (limited to 'sonar-plugin-api')
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/web/ServletFilter.java2
-rw-r--r--sonar-plugin-api/src/test/java/org/sonar/api/web/ServletFilterTest.java15
2 files changed, 12 insertions, 5 deletions
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/web/ServletFilter.java b/sonar-plugin-api/src/main/java/org/sonar/api/web/ServletFilter.java
index 69e3050a698..5da7fdb1c12 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/web/ServletFilter.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/web/ServletFilter.java
@@ -140,7 +140,7 @@ public abstract class ServletFilter implements Filter {
*/
public static class Builder {
private static final String WILDCARD_CHAR = "*";
- private static final Collection<String> STATIC_RESOURCES = unmodifiableList(asList("/css/*", "/fonts/*", "/images/*", "/js/*", "/static/*",
+ private static final Collection<String> STATIC_RESOURCES = unmodifiableList(asList("*.css", "*.css.map", "*.ico", "*.png", "*.gif", "*.svg", "*.js", "*.js.map", "*.eot", "*.ttf", "*.woff", "/static/*",
"/robots.txt", "/favicon.ico", "/apple-touch-icon*", "/mstile*"));
private final Set<String> inclusions = new LinkedHashSet<>();
diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/web/ServletFilterTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/web/ServletFilterTest.java
index 6bc34cdaeb5..6d98e78e2b0 100644
--- a/sonar-plugin-api/src/test/java/org/sonar/api/web/ServletFilterTest.java
+++ b/sonar-plugin-api/src/test/java/org/sonar/api/web/ServletFilterTest.java
@@ -217,10 +217,17 @@ public class ServletFilterTest {
@Test
public void test_staticResourcePatterns() {
assertThat(ServletFilter.UrlPattern.Builder.staticResourcePatterns()).containsOnly(
- "/css/*",
- "/fonts/*",
- "/images/*",
- "/js/*",
+ "*.css",
+ "*.css.map",
+ "*.ico",
+ "*.png",
+ "*.gif",
+ "*.svg",
+ "*.js",
+ "*.js.map",
+ "*.eot",
+ "*.ttf",
+ "*.woff",
"/static/*",
"/robots.txt",
"/favicon.ico",