ソースを参照

[release] 0.5.10

Yann Stepienik 2 年 前
コミット
caddef01d1
3 ファイル変更3 行追加3 行削除
  1. 1 1
      client/src/pages/home/index.jsx
  2. 1 1
      package.json
  3. 1 1
      src/proxy/shield.go

+ 1 - 1
client/src/pages/home/index.jsx

@@ -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>

+ 1 - 1
package.json

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

+ 1 - 1
src/proxy/shield.go

@@ -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