picosh / pico

hacker labs - open source and managed web services leveraging SSH
https://pico.sh
MIT License
741 stars 25 forks source link

prose.sh: Non-existent posts returning 200s #89

Closed errnoh closed 4 months ago

errnoh commented 4 months ago

Trying to open a non-existent page on a prose.sh blog ( lets use https://blog.pico.sh/example_not_found as an example ) returns a "post" that contains text like this:

Post not found
unlisted <date>
Post not found
Oops! we can't seem to find this post.

This makes sense, but there are at least two issues that likely should be addressed: 1) The HTTP return code is 200. It likely should be 404. 2) All customization (css, footers, etc) is skipped so it looks out of place.

(it would probably be good idea to have an option for custom 404 page. _404.md or something, but that sounds like it should be a separate feature request issue)

neurosnap commented 4 months ago

We now provide more user customization of the 404 page for blogs and properly return 404 status. You can upload _404.md to change the content of the 404 page as well.

https://github.com/picosh/pico/commit/193567a2d965ef2c60abcba9c94b7acdbf7d13d1

This change was deployed, lemme know if it works as expected!

errnoh commented 4 months ago

@neurosnap seems to work exactly as I'd expect! Returns 404 as expected, default 404 page looks consistent with the custom styling and at least based on initial testing _404.md works fine as well. Thank you :+1: