All Downloads are FREE. Search and download functionalities are using the official Maven repository.

skinny.controller.feature.XXSSProtectionHeaderFeature.scala Maven / Gradle / Ivy

There is a newer version: 2.5.2
Show newest version
package skinny.controller.feature

import skinny.micro.SkinnyMicroBase

/**
 * X-XSS-Protection header support
 *
 * - https://www.owasp.org/index.php/List_of_useful_HTTP_headers
 */
trait XXSSProtectionHeaderFeature { self: SkinnyMicroBase with BeforeAfterActionFeature =>

  // NOTE: for all HTML responses defined as Skinny routes
  beforeAction() {
    response(context).setHeader("X-XSS-Protection", "1; mode=block")
  }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy