Skip to content

Commit

Permalink
Revert "Replace Xirsys' local region urls with the global (recommende…
Browse files Browse the repository at this point in the history
…d) one"

This reverts commit 3740f35.
  • Loading branch information
Brutus5000 committed Nov 3, 2023
1 parent fcce220 commit c6dd231
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,6 @@ class XirsysSessionHandler(
) : SessionHandler {
companion object {
const val SERVER_NAME = "xirsys.com"

private val regionalUriRegex = Regex(pattern = "(?<protocol>\\w+):[\\w-]+\\.xirsys\\.com(?<query>.*)")
private val regionalUriReplace = "\${protocol}://global.xirsys.net\${query}"
fun normalizeAndReplaceUriWithGlobal(regionalUri: String) =
regionalUriRegex.replace(input = regionalUri, replacement = regionalUriReplace)
}

private val xirsysClient: XirsysClient = RestClientBuilder.newBuilder()
Expand Down Expand Up @@ -108,7 +103,7 @@ class XirsysSessionHandler(
// A sample response looks like "stun:fr-turn1.xirsys.com"
// The java URI class fails to read host and port due to the missing // after the :
// Thus we "normalize" the uri, even though it is technically valid
normalizeAndReplaceUriWithGlobal(url)
url.replaceFirst(":", "://")
},
),
)
Expand Down

This file was deleted.

0 comments on commit c6dd231

Please sign in to comment.