Closed davidkron closed 4 years ago
It used to be prefixing it... what grails version is this
On Fri, Sep 7, 2018, 6:38 AM davidkron notifications@github.com wrote:
Currently AssetPipelineFilter doesn't specify any order and gets placed after GrailsWebRequestFilter. In my opinion this is not correct and should be reevaluated as an asset request doesn't need a GrailsWebRequest and should therefore be placed before GrailsWebRequestFilter.
This has actually caused some side-effects in a production application of us: One thing the GrailsWebRequestFilter does is managing the flash scope. As the AssetPipelineFilter comes after GrailsWebRequestFilter, every request to an asset file will clear the flash scope, which can produce some interesting race conditions.
Also this causes some minimal performance overhead by creating and destroying a GrailsWebRequest.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/bertramdev/asset-pipeline/issues/226, or mute the thread https://github.com/notifications/unsubscribe-auth/AABaEsIVKUvb4oQ_DvS2C4NZ_UPULHycks5uYky3gaJpZM4WemS- .
I just tested with a new grails 3.3.8 project from http://start.grails.org. Also we have some grails 3.1.x applications in production, where I discovered the behavior.
In both these versions the GrailsWebRequestFilter
comes before AssetPipelineFilter
.
I could workaround the issue by adding the following to config in application.groovy
//FilterRegistrationBean.REQUEST_WRAPPER_FILTER_MAX_ORDER + 29 beans.assetPipelineFilter.order = 29
set order to 0 in 3.2.3 coming out today
Currently
AssetPipelineFilter
doesn't specify any order and gets placed afterGrailsWebRequestFilter
. In my opinion this is not correct and should be reevaluated as an asset request doesn't need aGrailsWebRequest
and should therefore be placed beforeGrailsWebRequestFilter
.This has actually caused some side-effects in a production application of us: One thing the
GrailsWebRequestFilter
does is managing the flash scope. As theAssetPipelineFilter
comes afterGrailsWebRequestFilter
, every request to an asset file will clear the flash scope, which can produce some interesting race conditions.Also this causes some minimal performance overhead by creating and destroying a
GrailsWebRequest
.