Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
IRMA
Github mirrors
irmago
Commits
fa318049
Commit
fa318049
authored
Apr 25, 2019
by
Sietse Ringers
Browse files
fix: irma server did not apply production mode defaults when using IRMASERVER_PRODUCTION env flag
Fixes #37
parent
9c1216a6
Changes
1
Hide whitespace changes
Inline
Side-by-side
server/irmad/cmd/root.go
View file @
fa318049
...
...
@@ -288,9 +288,15 @@ func productionMode() bool {
if
len
(
os
.
Args
)
==
i
+
1
||
strings
.
HasPrefix
(
os
.
Args
[
i
+
1
],
"--"
)
{
return
true
}
val
:=
strings
.
ToLower
(
os
.
Args
[
i
+
1
])
return
val
==
"1"
||
val
==
"true"
||
val
==
"yes"
||
val
==
"t"
if
checkConfVal
(
os
.
Args
[
i
+
1
])
{
return
true
}
}
}
return
false
return
checkConfVal
(
os
.
Getenv
(
"IRMASERVER_PRODUCTION"
))
}
func
checkConfVal
(
val
string
)
bool
{
lc
:=
strings
.
ToLower
(
val
)
return
lc
==
"1"
||
lc
==
"true"
||
lc
==
"yes"
||
lc
==
"t"
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment