Improved error message for improperly set csrf key

This commit is contained in:
Lucas Schumacher 2024-08-14 12:49:13 -04:00
parent a52e76c0da
commit a2d09d8e68

View File

@ -38,7 +38,7 @@ func ConnectDB() *sql.DB {
func main() {
csrfKey := []byte(os.Getenv("LENSLOCKED_CSRF_KEY"))
if len(csrfKey) < 32 {
panic("Error: bad csrf protection key")
panic("Error: bad csrf protection key\nPlease set a key with the LENSLOCKED_CSRF_KEY env var.")
}
db := ConnectDB()