package composition

import com.google.inject.Guice
import filters.{AccessLoggingFilter, EnsureSessionCreatedFilter}
import play.filters.gzip.GzipFilter
import services.csrf_prevention.CsrfPreventionFilter
import utils.helpers.ErrorStrategy

trait Composition {
  lazy val injector = Guice.createInjector(DevModule)

  lazy val filters = Array(
    new GzipFilter(),
    injector.getInstance(classOf[EnsureSessionCreatedFilter]),
    injector.getInstance(classOf[AccessLoggingFilter]),
    injector.getInstance(classOf[CsrfPreventionFilter])
  )

  lazy val errorStrategy = injector.getInstance(classOf[ErrorStrategy])
}
package composition

import com.google.inject.Guice
import filters.{AccessLoggingFilter, EnsureSessionCreatedFilter}
import play.filters.gzip.GzipFilter
import services.csrf_prevention.CsrfPreventionFilter
import utils.helpers.ErrorStrategy

trait Composition {
  lazy val injector = Guice.createInjector(DevModule)

  lazy val filters = Array(
    injector.getInstance(classOf[EnsureSessionCreatedFilter]),
    new GzipFilter(),
    injector.getInstance(classOf[AccessLoggingFilter]),
    injector.getInstance(classOf[CsrfPreventionFilter])
  )

  lazy val errorStrategy = injector.getInstance(classOf[ErrorStrategy])
}
Move the EnsureSessionCreatedFilter is the first of all possible filters the app is using.
Move the EnsureSessionCreatedFilter is the first of all possible filters the app is using.


Former-commit-id: ff29ab5d0c5c39cbbb49dbb4a467f4f6c0c486fe