mkaczanowski / pastebin

Simple, fast, standalone pastebin service
MIT License
155 stars 27 forks source link

Got HTML source instead of 404 #45

Open ReVoLt112 opened 1 year ago

ReVoLt112 commented 1 year ago

Hi, when i try to access a burned or timed out paste i get the html source instead of a rendered 404 message.

try it with: my Pastebin

ReVoLt112 commented 1 year ago

Seems to have something to do with uri-prefix, when a uri-prefix is set the 404 works.

One addition, if uri-prefix is set it would be nice if the root uri still replies

GAS85 commented 6 months ago

The reason is that contnet-type header is not set, so browser do not know that it is an HTML... I fix it with following apache2 configuration add to the pastebin.

Header setifempty content-type "text/html"