Permalink
Browse files

By default exclude files from /WEB-INF from resources plugin processing

  • Loading branch information...
1 parent 76519be commit 2d5d2a8b3e40111412051dbbeb32eae005fdcf35 @graemerocher graemerocher committed Feb 17, 2014
View
10 ...ls-core/src/main/groovy/org/codehaus/groovy/grails/commons/cfg/ConfigurationHelper.groovy
@@ -178,6 +178,16 @@ class ConfigurationHelper {
if (isLocations(locations)) {
mergeInLocations(config, (List)locations, resolver, classLoader)
}
+
+ // Sets defaults for non-present settings
+ initDefaultConfiguration(config)
+ }
+
+ static void initDefaultConfiguration(ConfigObject config) {
+ def resourcesConfig = config.grails.resources
+ if(!resourcesConfig.adhoc.excludes) {
+ resourcesConfig.adhoc.excludes = ['/WEB-INF/**']
+ }
}
private static getLocations(ConfigObject config) {
View
1 grails-resources/src/grails/grails-app/conf/Config.groovy
@@ -36,6 +36,7 @@ grails.mime.types = [ // the first one is the default format
// What URL patterns should be processed by the resources plugin
grails.resources.adhoc.patterns = ['/images/*', '/css/*', '/js/*', '/plugins/*']
+grails.resources.adhoc.excludes = ['/WEB-INF/**']
// Legacy setting for codec used to encode data with ${}
grails.views.default.codec = "html"

0 comments on commit 2d5d2a8

Please sign in to comment.