pwncollege / dojo

Infrastructure powering the pwn.college dojo
https://pwn.college
BSD 2-Clause "Simplified" License
304 stars 101 forks source link

Gracefully Handle Site Down via Service Worker API #371

Open ConnorNelson opened 8 months ago

ConnorNelson commented 8 months ago

We can use the fancy Service Worker API to still serve HTML when the site is down, assuming the user has previously visited the site. This can at least allow us to statically say "Hey, check the Discord for updates!", or if we are really fancy, display status updates. The latter sounds like a stretch goal.

adamdoupe commented 8 months ago

This is not a great idea. The Service Worker API is fraught with complications.

We can customize the 500 error message that nginx returns, which will help when CTFd is down or causing problems.

If the entire site is offline, it should just fail.