1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2026-04-19 21:46:43 -04:00

API key improvements

Fixed: Special characters in API key
New: Add heathcheck for API Key
This commit is contained in:
Bogdan
2023-05-08 06:56:26 +03:00
committed by GitHub
parent eaa4a358e8
commit 9325140b90
3 changed files with 37 additions and 3 deletions
+2 -2
View File
@@ -61,7 +61,7 @@ function Logger(minimumLogLevel) {
}
Logger.prototype.cleanse = function(message) {
const apikey = new RegExp(`access_token=${window.Sonarr.apiKey}`, 'g');
const apikey = new RegExp(`access_token=${encodeURIComponent(window.Sonarr.apiKey)}`, 'g');
return message.replace(apikey, 'access_token=(removed)');
};
@@ -105,7 +105,7 @@ class SignalRConnector extends Component {
this.connection = new signalR.HubConnectionBuilder()
.configureLogging(new Logger(signalR.LogLevel.Information))
.withUrl(`${url}?access_token=${window.Sonarr.apiKey}`)
.withUrl(`${url}?access_token=${encodeURIComponent(window.Sonarr.apiKey)}`)
.withAutomaticReconnect({
nextRetryDelayInMilliseconds: (retryContext) => {
if (retryContext.elapsedMilliseconds > 180000) {