khatru: allow disabling expiration manager.
This commit is contained in:
@@ -6,6 +6,7 @@ import (
|
||||
"log"
|
||||
"net/http"
|
||||
"os"
|
||||
"slices"
|
||||
"strconv"
|
||||
"strings"
|
||||
"sync"
|
||||
@@ -168,3 +169,12 @@ func (rl *Relay) getBaseURL(r *http.Request) string {
|
||||
}
|
||||
return proto + "://" + host
|
||||
}
|
||||
|
||||
func (rl *Relay) DisableExpiration() {
|
||||
rl.expirationManager.stop()
|
||||
idx := slices.Index(rl.Info.SupportedNIPs, 40)
|
||||
if idx != -1 {
|
||||
rl.Info.SupportedNIPs[idx] = rl.Info.SupportedNIPs[len(rl.Info.SupportedNIPs)-1]
|
||||
rl.Info.SupportedNIPs = rl.Info.SupportedNIPs[0 : len(rl.Info.SupportedNIPs)-1]
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user