|
@@ -12,21 +12,24 @@
|
|
|
|
|
|
|
|
|
grails.project.groupId = appName // change this to alter the default package name and Maven publishing destination
|
|
|
-grails.mime.file.extensions = true // enables the parsing of file extensions from URLs into the request format
|
|
|
-grails.mime.use.accept.header = false
|
|
|
-grails.mime.types = [ html: ['text/html','application/xhtml+xml'],
|
|
|
- xml: ['text/xml', 'application/xml'],
|
|
|
- text: 'text/plain',
|
|
|
- js: 'text/javascript',
|
|
|
- rss: 'application/rss+xml',
|
|
|
- atom: 'application/atom+xml',
|
|
|
- css: 'text/css',
|
|
|
- csv: 'text/csv',
|
|
|
- all: '*/*',
|
|
|
- json: ['application/json','text/json'],
|
|
|
- form: 'application/x-www-form-urlencoded',
|
|
|
- multipartForm: 'multipart/form-data'
|
|
|
- ]
|
|
|
+
|
|
|
+// The ACCEPT header will not be used for content negotiation for user agents containing the following strings (defaults to the 4 major rendering engines)
|
|
|
+grails.mime.disable.accept.header.userAgents = ['Gecko', 'WebKit', 'Presto', 'Trident']
|
|
|
+grails.mime.types = [
|
|
|
+ all: '*/*',
|
|
|
+ atom: 'application/atom+xml',
|
|
|
+ css: 'text/css',
|
|
|
+ csv: 'text/csv',
|
|
|
+ form: 'application/x-www-form-urlencoded',
|
|
|
+ html: ['text/html','application/xhtml+xml'],
|
|
|
+ js: 'text/javascript',
|
|
|
+ json: ['application/json', 'text/json'],
|
|
|
+ multipartForm: 'multipart/form-data',
|
|
|
+ rss: 'application/rss+xml',
|
|
|
+ text: 'text/plain',
|
|
|
+ hal: ['application/hal+json','application/hal+xml'],
|
|
|
+ xml: ['text/xml', 'application/xml']
|
|
|
+]
|
|
|
|
|
|
// URL Mapping Cache Max Size, defaults to 5000
|
|
|
//grails.urlmapping.cache.maxsize = 1000
|
|
@@ -34,10 +37,33 @@ grails.mime.types = [ html: ['text/html','application/xhtml+xml'],
|
|
|
// What URL patterns should be processed by the resources plugin
|
|
|
grails.resources.adhoc.patterns = ['/images/*', '/css/*', '/js/*', '/plugins/*']
|
|
|
|
|
|
+// Legacy setting for codec used to encode data with ${}
|
|
|
+grails.views.default.codec = "html"
|
|
|
+
|
|
|
+// The default scope for controllers. May be prototype, session or singleton.
|
|
|
+// If unspecified, controllers are prototype scoped.
|
|
|
+grails.controllers.defaultScope = 'singleton'
|
|
|
|
|
|
-// The default codec used to encode data with ${}
|
|
|
-grails.views.default.codec = "none" // none, html, base64
|
|
|
-grails.views.gsp.encoding = "UTF-8"
|
|
|
+// GSP settings
|
|
|
+grails {
|
|
|
+ views {
|
|
|
+ gsp {
|
|
|
+ encoding = 'UTF-8'
|
|
|
+ htmlcodec = 'xml' // use xml escaping instead of HTML4 escaping
|
|
|
+ codecs {
|
|
|
+ expression = 'html' // escapes values inside ${}
|
|
|
+ scriptlet = 'html' // escapes output from scriptlets in GSPs
|
|
|
+ taglib = 'none' // escapes output from taglibs
|
|
|
+ staticparts = 'none' // escapes output from static template parts
|
|
|
+ }
|
|
|
+ }
|
|
|
+ // escapes all not-encoded output at final stage of outputting
|
|
|
+ filteringCodecForContentType {
|
|
|
+ //'text/html' = 'html'
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
grails.converters.encoding = "UTF-8"
|
|
|
// enable Sitemesh preprocessing of GSP pages
|
|
|
grails.views.gsp.sitemesh.preprocess = true
|
|
@@ -91,27 +117,3 @@ log4j = {
|
|
|
'org.hibernate',
|
|
|
'net.sf.ehcache.hibernate'
|
|
|
}
|
|
|
-
|
|
|
-// Uncomment and edit the following lines to start using Grails encoding & escaping improvements
|
|
|
-
|
|
|
-/* remove this line
|
|
|
-// GSP settings
|
|
|
-grails {
|
|
|
- views {
|
|
|
- gsp {
|
|
|
- encoding = 'UTF-8'
|
|
|
- htmlcodec = 'xml' // use xml escaping instead of HTML4 escaping
|
|
|
- codecs {
|
|
|
- expression = 'html' // escapes values inside null
|
|
|
- scriptlet = 'none' // escapes output from scriptlets in GSPs
|
|
|
- taglib = 'none' // escapes output from taglibs
|
|
|
- staticparts = 'none' // escapes output from static template parts
|
|
|
- }
|
|
|
- }
|
|
|
- // escapes all not-encoded output at final stage of outputting
|
|
|
- filteringCodecForContentType {
|
|
|
- //'text/html' = 'html'
|
|
|
- }
|
|
|
- }
|
|
|
-}
|
|
|
-remove this line */
|