Improved error message for improperly set csrf key
This commit is contained in:
parent
a52e76c0da
commit
a2d09d8e68
2
main.go
2
main.go
@ -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()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user