mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-06 21:12:15 -07:00
API key improvements
Fixed: Special characters in API key New: Add heathcheck for API Key (cherry picked from commit 9325140b90f8ac625ae5b26075748c22f6f06158) Closes #3636
This commit is contained in:
parent
7f3ccf659c
commit
8b512caa67
4 changed files with 39 additions and 3 deletions
|
@ -60,7 +60,7 @@ function Logger(minimumLogLevel) {
|
|||
}
|
||||
|
||||
Logger.prototype.cleanse = function(message) {
|
||||
const apikey = new RegExp(`access_token=${window.Lidarr.apiKey}`, 'g');
|
||||
const apikey = new RegExp(`access_token=${encodeURIComponent(window.Lidarr.apiKey)}`, 'g');
|
||||
return message.replace(apikey, 'access_token=(removed)');
|
||||
};
|
||||
|
||||
|
@ -104,7 +104,7 @@ class SignalRConnector extends Component {
|
|||
|
||||
this.connection = new signalR.HubConnectionBuilder()
|
||||
.configureLogging(new Logger(signalR.LogLevel.Information))
|
||||
.withUrl(`${url}?access_token=${window.Lidarr.apiKey}`)
|
||||
.withUrl(`${url}?access_token=${encodeURIComponent(window.Lidarr.apiKey)}`)
|
||||
.withAutomaticReconnect({
|
||||
nextRetryDelayInMilliseconds: (retryContext) => {
|
||||
if (retryContext.elapsedMilliseconds > 180000) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue