[release] 0.5.10

This commit is contained in:
Yann Stepienik 2023-05-20 20:58:25 +01:00
parent f0a7cc9c72
commit caddef01d1
3 changed files with 3 additions and 3 deletions

View file

@ -179,7 +179,7 @@ const HomePage = () => {
<div style={{minWidth: 0 }}>
<h3 style={blockStyle}>{route.Name}</h3>
<p style={blockStyle}>{route.Description}</p>
<p style={blockStyle}>{route.Target}</p>
<p style={{...blockStyle, fontSize: '90%', paddingTop: '3px', opacity: '0.45'}}>{route.Target}</p>
</div>
</Stack>
</Link>

View file

@ -1,6 +1,6 @@
{
"name": "cosmos-server",
"version": "0.5.9",
"version": "0.5.10",
"description": "",
"main": "test-server.js",
"bugs": {

View file

@ -235,7 +235,7 @@ func calculateLowestExhaustedPercentage(policy utils.SmartShieldPolicy, userCons
func GetClientID(r *http.Request) string {
// when using Docker we need to get the real IP
if os.Getenv("HOSTNAME") != "" {
if os.Getenv("HOSTNAME") != "" && r.Header.Get("x-forwarded-for") != "" {
ip, _, _ := net.SplitHostPort(r.Header.Get("x-forwarded-for"))
utils.Debug("SmartShield: Getting client ID " + ip)
return ip