val version = <generate version here>
LiftRules.attachResourceId = (path: String) => {
if(path.startsWith("/")) {
"/webcache/" + version + path
} else {
"/webcache/" + version + "/" + path
}
}
// Remove the cache/{resourceId} from the request if there is one
LiftRules.statelessRewrite.prepend(NamedPF("BrowserCacheAssist") {
case req @ RewriteRequest(ParsePath("webcache" :: id :: path, suffix, _, _), _, _) => {
RewriteResponse((path, suffix) :: Nil)
}
})
RewriteResponse(ParsePath(List(static, css, app),css,true,false),Map(),false)
--
--
Lift, the simply functional web framework: http://liftweb.net
Code: http://github.com/lift
Discussion: http://groups.google.com/group/liftweb
Stuck? Help us help you: https://www.assembla.com/wiki/show/liftweb/Posting_example_code
---
You received this message because you are subscribed to the Google Groups "Lift" group.
To unsubscribe from this group and stop receiving emails from it, send an email to liftweb+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
val version = <generate version here>
LiftRules.attachResourceId = (path: String) => {
if(path.startsWith("/")) {
"/webcache/" + version + path
} else {
"/webcache/" + version + "/" + path
}
}
// Remove the cache/{resourceId} from the request if there is one
LiftRules.statelessRewrite.prepend(NamedPF("BrowserCacheAssist") {
case req @ RewriteRequest(ParsePath("webcache" :: id :: path, suffix, _, _), _, _) => {
RewriteResponse(path, suffix)
}
})
Silly question but, if you go to the URL with no resource I'd, does the container serve the file?
Diego
Sent from my cell
--
I wonder if the way to do this is with a servlet filter before the request reaches Lift. I don't know how to do that, or if it's possible, but I might have a dig around that area.
Sent from a mobile device, so may be terse.
To unsubscribe from this group and stop receiving emails from it, send an email to liftweb+unsubscribe@googlegroups.com.
--
--
Lift, the simply functional web framework: http://liftweb.net
Code: http://github.com/lift
Discussion: http://groups.google.com/group/liftweb
Stuck? Help us help you: https://www.assembla.com/wiki/show/liftweb/Posting_example_code
---
You received this message because you are subscribed to the Google Groups "Lift" group.
To unsubscribe from this group and stop receiving emails from it, send an email to liftweb+unsubscribe@googlegroups.com.
LiftRules.attachResourceId = (path: String) => {
if (path.startsWith("/")) {
version + path
} else {
version + "/" + path
}
}
To unsubscribe from this group and stop receiving emails from it, send an email to liftweb+unsubscribe@googlegroups.com.
--
--
--
Lift, the simply functional web framework: http://liftweb.net
Code: http://github.com/lift
Discussion: http://groups.google.com/group/liftweb
Stuck? Help us help you: https://www.assembla.com/wiki/show/liftweb/Posting_example_code
---
You received this message because you are subscribed to the Google Groups "Lift" group.
To unsubscribe from this group and stop receiving emails from it, send an email to liftweb+unsubscribe@googlegroups.com.