Skip to content

Commit

Permalink
add inline plugin that removes cookie-config element from web.xml for…
Browse files Browse the repository at this point in the history
… development environment

- current config allows only https sessions
  • Loading branch information
lhotari committed Feb 24, 2015
1 parent 5d8bf1b commit 823af7e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
2 changes: 2 additions & 0 deletions grails-app/conf/BuildConfig.groovy
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
grails.plugin.location.like = "${basedir}/inline-plugins/like"

grails.plugin.location.'dev-session-cookie' = "${basedir}/inline-plugins/dev-session-cookie"

grails.servlet.version = "3.0" // Change depending on target container compliance (2.5 or 3.0)
grails.project.class.dir = "target/classes"
grails.project.test.class.dir = "target/test-classes"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import grails.util.Environment

class DevSessionCookieGrailsPlugin {
def version = "1.0"
def doWithWebDescriptor = { xml ->
if(Environment.current.isDevelopmentMode()) {
// remove cookie-config element from session-config
xml.'session-config'.'cookie-config'[0]?.replaceNode { }
}
}
}

0 comments on commit 823af7e

Please sign in to comment.