渡辺ã§ãã ä»æ¥ãJavaã¨AWSã§ã®å°ãã¿ã§ãã AWSã§ã¯ELBãå©ç¨ãããã¨ã§ç°¡åã«åé·åãè² è·åæ£ã®æ§æãä½ããã¨ãã§ãã¾ãã ããããELBãå段ã«ç½®ãããããªã¯ã¨ã¹ãå ã®IPã¢ãã¬ã¹ã§ã¢ã¯ã»ã¹ãæå¦ãããã¨ãã¢ã¯ã»ã¹å IPã¢ãã¬ã¹ãå¤å®ãã¦ãªãããã®å¦çãè¡ãããå ´åããªã¯ã¨ã¹ãå IPã¢ãã¬ã¹ãELBã®IPã¢ãã¬ã¹ã¨ãªã£ã¦ãã¾ãã¾ãã ApacheãNginxã®è¨å®ãªã©ã§ã¯ãæ¤ç´¢ãã¦ã¿ãã°ãªã¯ã¨ã¹ãã®ãX-Forwarded-Forããåç §ããã°è¯ãã¨å¤ãã®æ å ±ããããããã§ãããã ä»åã¯ãServletã§è¡ãå ´åã®æ¹æ³ãç´¹ä»ãã¾ãã ServletRequest#getRemoteAddr - Servletã§ãªã¯ã¨ã¹ãå ã®IPã¢ãã¬ã¹ãåå¾ãã ELBãçµç±ããªãå ´åãªã©ãç´æ¥ã¢ã¯ã»ã¹ãããå ´åã¯ãServletRequestã¯ã©ã¹ã®getRemoteAddrã¡ã½ãããå©
{{#tags}}- {{label}}
{{/tags}}