mirror of
https://github.com/documize/community.git
synced 2025-08-10 07:55:25 +02:00
Fixed up DB check code to strip MySL version suffix strings
This commit is contained in:
parent
d74a56aac1
commit
f5d9fa49a3
3 changed files with 19 additions and 9 deletions
|
@ -230,6 +230,11 @@ func cors(w http.ResponseWriter, r *http.Request, next http.HandlerFunc) {
|
|||
func metrics(w http.ResponseWriter, r *http.Request, next http.HandlerFunc) {
|
||||
w.Header().Add("X-Documize-Version", AppVersion)
|
||||
w.Header().Add("Cache-Control", "no-cache")
|
||||
|
||||
// if certFile != "" && keyFile != "" {
|
||||
// w.Header().Add("Strict-Transport-Security", "max-age=63072000; includeSubDomains")
|
||||
// }
|
||||
|
||||
next(w, r)
|
||||
}
|
||||
|
||||
|
|
|
@ -67,6 +67,11 @@ func Check(Db *sqlx.DB, connectionString string,lDB func() (bool, error),ulDB fu
|
|||
return false
|
||||
}
|
||||
|
||||
// See http://dba.stackexchange.com/questions/63763/is-there-any-difference-between-these-two-version-of-mysql-5-1-73-community-lo
|
||||
version = strings.Replace(version, "-log", "", 1)
|
||||
version = strings.Replace(version, "-debug", "", 1)
|
||||
version = strings.Replace(version, "-demo", "", 1)
|
||||
|
||||
{ // check minimum MySQL version as we need JSON column type. 5.7.10
|
||||
vParts := strings.Split(version, ".")
|
||||
if len(vParts) < 3 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue