Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion modules/relay/src/main/RelayRoundForm.scala
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,8 @@ object RelayRoundForm:
host <- Option(url.host).map(_.toHostString)
// prevent common mistakes (not for security)
if mode.notProd || !blocklist.exists(subdomain(host, _))
if !subdomain(host, "chess.com") || url.toString.startsWith("https://api.chess.com/pub")
if !subdomain(host, "chess.com") || url.toString.startsWith("https://api.chess.com/pub") || url.toString
.startsWith("https://www.chess.com/events/v1/api")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are you sure about the www. ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes it is correct the links we have use www
they don't use without subdomain like lichess

yield url

private def validateUpstreamUrl(s: String)(using Me, Mode): Either[String, URL] = for
Expand Down