ngx.header.content_type = 'text/html'; local backend_num = ngx.shared.servers:get("inv-backends"); local function generate_backend_list() local html = "" for i=1, backend_num do html = html .. "

Backend " .. i .. "

" end return html end ngx.say([[ 503 Service Unavailable

503 Service Unavailable

Invidious is currently restarting

If you don't get an alive backend after 1 minute, it's because something is wrong...

Refreshing automatically in 2 seconds

Do you want to switch to another backend?

]] .. generate_backend_list() .. [[

If this page doesn't redirect you to any alive backend then there is no available backends alive.

]])