fix "invalid session"
This commit is contained in:
		@@ -49,6 +49,7 @@ func InitRouters(router *gin.Engine, db *gorm.DB, meta *ServerMeta, skinRootUrl
 | 
			
		||||
	textureRouter := NewTextureRouter(textureService)
 | 
			
		||||
 | 
			
		||||
	router.GET("/", homeRouter.Home)
 | 
			
		||||
	router.HEAD("/", homeRouter.Home)
 | 
			
		||||
	authserver := router.Group("/authserver")
 | 
			
		||||
	{
 | 
			
		||||
		authserver.POST("/register", userRouter.Register)
 | 
			
		||||
 
 | 
			
		||||
@@ -68,8 +68,7 @@ func (s *sessionRouterImpl) JoinServer(c *gin.Context) {
 | 
			
		||||
func (s *sessionRouterImpl) HasJoinedServer(c *gin.Context) {
 | 
			
		||||
	username := c.Query("username")
 | 
			
		||||
	serverId := c.Query("serverId")
 | 
			
		||||
	ip := c.DefaultQuery("ip",
 | 
			
		||||
		c.Request.RemoteAddr[:strings.LastIndexByte(c.Request.RemoteAddr, ':')])
 | 
			
		||||
	ip := c.Query("ip")
 | 
			
		||||
	var textureBaseUrl string
 | 
			
		||||
	if len(s.skinRootUrl) > 0 {
 | 
			
		||||
		textureBaseUrl = strings.TrimRight(s.skinRootUrl, "/") + "/textures"
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user