This commit is contained in:
@@ -5,7 +5,7 @@ import (
|
|||||||
"log"
|
"log"
|
||||||
"net/http"
|
"net/http"
|
||||||
"net/url"
|
"net/url"
|
||||||
"path/filepath"
|
"path"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
|
||||||
"tomatentum.net/svg-templater/pkg/format"
|
"tomatentum.net/svg-templater/pkg/format"
|
||||||
@@ -92,10 +92,10 @@ func DownloadSVG(w http.ResponseWriter, r *http.Request) {
|
|||||||
w.Write(json)
|
w.Write(json)
|
||||||
}
|
}
|
||||||
|
|
||||||
func getPublicUrl(r *http.Request, path string) string {
|
func getPublicUrl(r *http.Request, subpath string) string {
|
||||||
newURL := url.URL{
|
newURL := url.URL{
|
||||||
Host: r.Host,
|
Host: r.Host,
|
||||||
Path: filepath.Join("public", path),
|
Path: path.Join("public", subpath),
|
||||||
}
|
}
|
||||||
newURL.Scheme = "http"
|
newURL.Scheme = "http"
|
||||||
if r.TLS != nil {
|
if r.TLS != nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user