This commit is contained in:
Egor 2026-02-03 21:10:43 -08:00
parent 03e5981482
commit ba4c245189
5 changed files with 2 additions and 7 deletions

View file

@ -1,8 +1,5 @@
node_modules/
signal-cli/ signal-cli/
data/ data/
*.db *.db
prism prism
prism-* prism-*
proton-bridge/node_modules
node_modules

1
.gitignore vendored
View file

@ -1,6 +1,5 @@
signal-cli/ signal-cli/
data/ data/
tmp/
*.db *.db
.env .env
/prism /prism

View file

@ -183,7 +183,7 @@ func (s *Server) getAppsListHTML(mappings []notification.Mapping) string {
</form>`, m.AppName, map[bool]string{true: " selected", false: ""}[isSignal], map[bool]string{true: " selected", false: ""}[isWebPush], webpushLabel) </form>`, m.AppName, map[bool]string{true: " selected", false: ""}[isSignal], map[bool]string{true: " selected", false: ""}[isWebPush], webpushLabel)
} }
itemHTML += fmt.Sprintf(`<button class="btn-delete" hx-delete="/action/delete-app/%s" hx-target="#apps-list" hx-swap="innerHTML">Delete</button></div></li>`, m.AppName) itemHTML += fmt.Sprintf(`<button class="btn-delete" hx-delete="/action/app/%s" hx-target="#apps-list" hx-swap="innerHTML">Delete</button></div></li>`, m.AppName)
html += itemHTML html += itemHTML
} }

View file

@ -87,7 +87,7 @@ func (s *Server) setupRoutes() {
r.Route("/action", func(r chi.Router) { r.Route("/action", func(r chi.Router) {
r.Use(authMiddleware(s.cfg.APIKey)) r.Use(authMiddleware(s.cfg.APIKey))
r.Delete("/delete-app/{appName}", s.handleDeleteAppAction) r.Delete("/app/{appName}", s.handleDeleteAppAction)
r.Post("/toggle-channel", s.handleToggleChannelAction) r.Post("/toggle-channel", s.handleToggleChannelAction)
}) })

View file

@ -38,7 +38,6 @@ func VerifyAPIKey(r *http.Request, apiKey string) bool {
return false return false
} }
// Enforce HTTPS for non-local connections
proto := r.Header.Get("X-Forwarded-Proto") proto := r.Header.Get("X-Forwarded-Proto")
if proto == "" { if proto == "" {
if r.TLS != nil { if r.TLS != nil {