mirror of
https://github.com/gitbucket/gitbucket.git
synced 2026-05-06 18:26:28 +02:00
(refs #1101)No need transaction for /git-lfs
This commit is contained in:
@@ -21,8 +21,10 @@ class TransactionFilter extends Filter {
|
||||
def destroy(): Unit = {}
|
||||
|
||||
def doFilter(req: ServletRequest, res: ServletResponse, chain: FilterChain): Unit = {
|
||||
if(req.asInstanceOf[HttpServletRequest].getServletPath().startsWith("/assets/")){
|
||||
// assets don't need transaction
|
||||
val servletPath = req.asInstanceOf[HttpServletRequest].getServletPath()
|
||||
println(servletPath)
|
||||
if(servletPath.startsWith("/assets/") || servletPath.startsWith("/git-lfs")){
|
||||
// assets and git-lfs don't need transaction
|
||||
chain.doFilter(req, res)
|
||||
} else {
|
||||
Database() withTransaction { session =>
|
||||
|
||||
Reference in New Issue
Block a user