From 94d3d7bde252693e5c1f84c5339aef0bc3db48b6 Mon Sep 17 00:00:00 2001 From: Anthony Lapenna Date: Wed, 14 Nov 2018 12:20:33 +1300 Subject: [PATCH] feat(motd): relocate motd file URL and always return 200 (#2466) --- api/http/handler/motd/motd.go | 2 +- api/portainer.go | 2 +- app/portainer/views/home/home.html | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/api/http/handler/motd/motd.go b/api/http/handler/motd/motd.go index ca279d890..53246fec1 100644 --- a/api/http/handler/motd/motd.go +++ b/api/http/handler/motd/motd.go @@ -18,7 +18,7 @@ func (handler *Handler) motd(w http.ResponseWriter, r *http.Request) { motd, err := client.Get(portainer.MessageOfTheDayURL, 0) if err != nil { - w.WriteHeader(http.StatusInternalServerError) + response.JSON(w, &motdResponse{Message: ""}) return } diff --git a/api/portainer.go b/api/portainer.go index 6682017b7..f75574723 100644 --- a/api/portainer.go +++ b/api/portainer.go @@ -714,7 +714,7 @@ const ( // DBVersion is the version number of the Portainer database DBVersion = 14 // MessageOfTheDayURL represents the URL where Portainer MOTD message can be retrieved - MessageOfTheDayURL = "https://raw.githubusercontent.com/portainer/motd/master/message.html" + MessageOfTheDayURL = "https://portainer-io-assets.sfo2.digitaloceanspaces.com/motd.html" // PortainerAgentHeader represents the name of the header available in any agent response PortainerAgentHeader = "Portainer-Agent" // PortainerAgentTargetHeader represent the name of the header containing the target node name diff --git a/app/portainer/views/home/home.html b/app/portainer/views/home/home.html index 1ffaa88bd..86767459e 100644 --- a/app/portainer/views/home/home.html +++ b/app/portainer/views/home/home.html @@ -8,7 +8,7 @@