hplush / slowreader

Web app to combine feeds from social networks and RSS and to help read more meaningful and deep content
https://dev.slowreader.app
GNU Affero General Public License v3.0
161 stars 37 forks source link

Add custom error pages to self-hosted version #255

Open ai opened 2 months ago

ai commented 2 months ago

On production static server we have custom pages for 404 and 500 error:

https://dev.slowreader.app/500.html https://dev.slowreader.app/404.html

But we don’t have such for self-hosted version when assets are served from Logux server.

  1. Send PR to @logux/server with an API to define HTML of 404 and 500 page and use them in HTTP server.
  2. Read assets/404.html and assets/500.html and pass content to that new API in server/module/assets.ts (if assets was enabled).
  3. Be sure that Content-Security-Policy works with inline <style> of that pages.