Force update ws.js

This commit is contained in:
giongto35 2019-06-19 04:30:32 +08:00 committed by giongto35
parent 102ce66fe0
commit e0462326f4
2 changed files with 1 additions and 16 deletions

View file

@ -253,21 +253,6 @@ func (o *Server) cleanConnection(client *WorkerClient, serverID string) {
client.Close()
}
func readUserIP(r *http.Request) string {
IPAddress := r.Header.Get("X-Real-Ip")
if IPAddress == "" {
IPAddress = r.Header.Get("X-Forwarded-For")
}
if IPAddress == "" {
IPAddress = r.RemoteAddr
}
// TODO: For debug, should remove it
if IPAddress == "" {
return "localhost"
}
return IPAddress
}
func getRemoteAddress(conn *websocket.Conn) string {
var remoteAddr string
log.Println(conn.RemoteAddr().String())

2
static/game.html vendored
View file

@ -94,7 +94,7 @@
<script src="/static/js/gesture_keyboard.js?1"></script>
<script src="/static/js/gesture_touch.js?1"></script>
<script src="/static/js/gesture_joystick.js?1"></script>
<script src="/static/js/ws.js?1"></script>
<script src="/static/js/ws.js?2"></script>
<script src="/static/js/init.js?1"></script>