3ec367a759
* Added new dep: gorilla/csrf * CSRF field in forms * CSRF variable in commontemplatevariables * New key for messages and user context Please change EnableSecureCSRF to false when testing locally and don't merge config/env.go with the changes
17 lignes
642 o
Go
17 lignes
642 o
Go
package config
|
|
|
|
// /!\ PLEASE DONT PULL THIS FILE UNLESS NEEDED CHANGES /!\
|
|
|
|
// TODO: Perform environment configuration at runtime
|
|
// Future hosts shouldn't have to rebuild the binary to update a setting
|
|
|
|
const (
|
|
// Environment should be one of: DEVELOPMENT, TEST, PRODUCTION
|
|
Environment = "DEVELOPMENT"
|
|
// WebAddress : url of the website
|
|
WebAddress = "nyaa.pantsu.cat"
|
|
// AuthTokenExpirationDay : Number of Days for token expiration when logged in
|
|
AuthTokenExpirationDay = 1000
|
|
// EnableSecureCSRF : Enable CSRF https mode : True if website support https, false otherwise (eg. testing locally: false)
|
|
EnableSecureCSRF = true
|
|
)
|