Disable external links when EnableExternalServices is false. Fix #2022

This commit is contained in:
Deluan
2023-01-25 10:28:03 -05:00
parent e0fc997adb
commit 1950c07b1d
5 changed files with 19 additions and 2 deletions
+11
View File
@@ -310,6 +310,17 @@ var _ = Describe("serveIndex", func() {
Expect(config).To(HaveKeyWithValue("enableReplayGain", true))
})
It("sets the enableExternalServices", func() {
conf.Server.EnableExternalServices = true
r := httptest.NewRequest("GET", "/index.html", nil)
w := httptest.NewRecorder()
serveIndex(ds, fs, nil)(w, r)
config := extractAppConfig(w.Body.String())
Expect(config).To(HaveKeyWithValue("enableExternalServices", true))
})
Describe("loginBackgroundURL", func() {
Context("empty BaseURL", func() {
BeforeEach(func() {