diff options
| author | Christine Dodrill <me@christine.website> | 2018-12-10 08:14:00 -0800 |
|---|---|---|
| committer | Christine Dodrill <me@christine.website> | 2018-12-10 08:16:53 -0800 |
| commit | 8ff1e285d8bf208fdf2653b42856b4356b853949 (patch) | |
| tree | 48bc07a566539806992749ac4089c2d3f2f3dfe4 /cmd | |
| parent | cbfa82218c60a4a1c52f4d217f6f053de8fcad4e (diff) | |
| download | xesite-8ff1e285d8bf208fdf2653b42856b4356b853949.tar.xz xesite-8ff1e285d8bf208fdf2653b42856b4356b853949.zip | |
cmd/site: ignore url params
Diffstat (limited to 'cmd')
| -rw-r--r-- | cmd/site/html.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/cmd/site/html.go b/cmd/site/html.go index ba304c5..5c6b828 100644 --- a/cmd/site/html.go +++ b/cmd/site/html.go @@ -56,9 +56,10 @@ func (s *Site) showPost(w http.ResponseWriter, r *http.Request) { return } + cmp := r.URL.Path[1:] var p *Post for _, pst := range s.Posts { - if pst.Link == r.RequestURI[1:] { + if pst.Link == cmp { p = pst } } |
