Skip to content

Commit

Permalink
Increase coep:credentialless min Firefox version to 112
Browse files Browse the repository at this point in the history
  • Loading branch information
benediktwerner committed Apr 15, 2023
1 parent 0b5d23a commit d3deece
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/controllers/CtrlExtensions.scala
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ trait CtrlExtensions extends ControllerHelpers:
def enableSharedArrayBuffer(using req: RequestHeader): Result = {
if HTTPRequest.isChrome96Plus(req) then
result.withHeaders("Cross-Origin-Embedder-Policy" -> "credentialless")
else if HTTPRequest.isFirefox108Plus(req) && env.firefoxOriginTrial.get().nonEmpty then
else if HTTPRequest.isFirefox112Plus(req) && env.firefoxOriginTrial.get().nonEmpty then
result.withHeaders(
"Origin-Trial" -> env.firefoxOriginTrial.get(),
"Cross-Origin-Embedder-Policy" -> "credentialless"
Expand Down
2 changes: 1 addition & 1 deletion modules/common/src/main/HTTPRequest.scala
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ object HTTPRequest:
}

val isChrome96Plus = UaMatcher("""Chrome/(?:\d{3,}|9[6-9])""")
val isFirefox108Plus = UaMatcher("""Firefox/(?:10[8-9]|1[1-9]\d)""")
val isFirefox112Plus = UaMatcher("""Firefox/(?:11[2-9]|1[2-9]\d)""")
val isMobile = UaMatcher("""(?i)iphone|ipad|ipod|android.+mobile""")
val isLichessMobile = UaMatcher("""Lichess Mobile/""")

Expand Down

0 comments on commit d3deece

Please sign in to comment.