elli-lib / elli_fileserve

Development has moved to elli_static.
https://github.com/elli-lib/elli_static
0 stars 4 forks source link

Custom 404.html #7

Open tsloughter opened 7 years ago

tsloughter commented 7 years ago

It should be possible to define the response for a 404 to be other than simply File Not Found, one might want to return a 404 html page for example.

yurrriq commented 7 years ago

Agreed.

yurrriq commented 7 years ago

Perhaps we could accomplish this by supporting a configurable elli_middleware callback module, if given (and valid) we could call its postprocess/3 and allow users to modify the default 403/404 responses as desired.

Related: https://github.com/elli-lib/elli/issues/3

yurrriq commented 7 years ago

How about parsing {not_found, elli_hander:result()} in FileserveConfig?