Compare commits

...

2 Commits

Author SHA1 Message Date
b561ca87c8 removed local icon font 2022-12-18 09:17:36 +01:00
Timon Ringwald
6f449301ff use https as default scheme for links 2022-11-23 09:58:06 +01:00
2 changed files with 14 additions and 3 deletions

13
main.go
View File

@ -159,6 +159,19 @@ func saveChanges(w http.ResponseWriter, r *http.Request) {
return
}
for _, bookmark := range sessionData.Bookmarks {
uri, err := url.Parse(bookmark.Link)
if err != nil {
fmt.Println(err)
w.WriteHeader(http.StatusBadRequest)
return
}
if uri.Scheme == "" {
uri.Scheme = "https"
}
bookmark.Link = uri.String()
}
Reorder(sessionData.Bookmarks)
if err := DeleteBookmarksBySessionID(session.ID); err != nil {
fmt.Println(err)

View File

@ -3,9 +3,7 @@
font-style: normal;
font-weight: 400;
src: url("/static/icons.ttf");
src: local('Material Icons'),
local('MaterialIcons-Regular'),
url("/static/icons.ttf") format('truetype');
src: url("/static/icons.ttf") format('truetype');
}
.material-icons {