diff options
Diffstat (limited to 'app')
| -rw-r--r-- | app/Main.hs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/app/Main.hs b/app/Main.hs index d73a617..259f018 100644 --- a/app/Main.hs +++ b/app/Main.hs @@ -168,7 +168,6 @@ app AppData{..} request respond = mkAnswer >>= (respond . toResponse) | null platforms -> pure $ Html $ "Found no information, sorry.<br><br>If you want to investigate, the attempted query was:<br><br><pre>" <> decodeUtf8 overpassQuery - <> "</pre>" | otherwise -> do let answer = V.toList platforms & sortOn (maybe (0::Int) (fromRight 0 . fmap fst . T.signed T.decimal) . osmLevel) @@ -239,7 +238,10 @@ app AppData{..} request respond = mkAnswer >>= (respond . toResponse) Plaintext msg -> responseLBS status200 (mkHeaders "text/plain") (LB.fromStrict $ encodeUtf8 msg) Html markup -> responseLBS - status200 (mkHeaders "text/html") (LB.fromStrict $ encodeUtf8 markup) + status200 (mkHeaders "text/html") $ LB.fromStrict $ + "<html lang=\"en\"><head><meta charset=\"utf-8\"><meta name=\"viewport\" content=\"width=device-width, initial-scale=1\"></head><body>" + <> encodeUtf8 markup + <> "</body></html>" Notfound -> responseLBS status404 (mkHeaders "text/plain") "??" Unimplemented -> responseLBS |
