remove CSP live setting
parent
1b07c75b90
commit
0e735f82df
|
@ -16,7 +16,6 @@ object Dev extends LilaController {
|
|||
Env.irwin.irwinModeSetting,
|
||||
Env.explorer.indexFlowSetting,
|
||||
Env.report.scoreThresholdSetting,
|
||||
Env.api.cspEnabledSetting,
|
||||
Env.streamer.alwaysFeaturedSetting,
|
||||
Env.rating.ratingFactorsSetting,
|
||||
Env.plan.donationGoalSetting
|
||||
|
|
|
@ -45,8 +45,6 @@ object Environment
|
|||
|
||||
def contactEmailLink = a(href := s"mailto:$contactEmail")(contactEmail)
|
||||
|
||||
def cspEnabled = apiEnv.cspEnabledSetting.get _
|
||||
|
||||
def isChatPanicEnabled =
|
||||
lila.chat.Env.current.panic.enabled
|
||||
|
||||
|
|
|
@ -16,12 +16,10 @@ object layout {
|
|||
val topComment = raw("""<!-- Lichess is open source! See https://github.com/ornicar/lila -->""")
|
||||
val charset = raw("""<meta charset="utf-8">""")
|
||||
val viewport = raw("""<meta name="viewport" content="width=device-width,initial-scale=1,viewport-fit=cover"/>""")
|
||||
def metaCsp(csp: ContentSecurityPolicy): Option[Frag] =
|
||||
cspEnabled() option raw(
|
||||
s"""<meta http-equiv="Content-Security-Policy" content="$csp">"""
|
||||
)
|
||||
def metaCsp(csp: Option[ContentSecurityPolicy])(implicit ctx: Context): Option[Frag] =
|
||||
metaCsp(csp.getOrElse(defaultCsp))
|
||||
def metaCsp(csp: ContentSecurityPolicy): Frag = raw {
|
||||
s"""<meta http-equiv="Content-Security-Policy" content="$csp">"""
|
||||
}
|
||||
def metaCsp(csp: Option[ContentSecurityPolicy])(implicit ctx: Context): Frag = metaCsp(csp getOrElse defaultCsp)
|
||||
def pieceSprite(implicit ctx: Context): Frag = pieceSprite(ctx.currentPieceSet)
|
||||
def pieceSprite(ps: lila.pref.PieceSet): Frag =
|
||||
link(id := "piece-sprite", href := assetUrl(s"piece-css/$ps.css"), tpe := "text/css", rel := "stylesheet")
|
||||
|
|
|
@ -61,12 +61,6 @@ final class Env(
|
|||
private val InfluxEventEndpoint = config getString "api.influx_event.endpoint"
|
||||
private val InfluxEventEnv = config getString "api.influx_event.env"
|
||||
|
||||
val cspEnabledSetting = settingStore[Boolean](
|
||||
"cspEnabled",
|
||||
default = true,
|
||||
text = "Enable CSP for everyone.".some
|
||||
)
|
||||
|
||||
object Accessibility {
|
||||
val blindCookieName = config getString "accessibility.blind.cookie.name"
|
||||
val blindCookieMaxAge = config getInt "accessibility.blind.cookie.max_age"
|
||||
|
|
Loading…
Reference in New Issue