All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.sentry.event.helper.BasicRemoteAddressResolver Maven / Gradle / Ivy

There is a newer version: 8.0.0-rc.3
Show newest version
package io.sentry.event.helper;

import javax.servlet.http.HttpServletRequest;

/**
 * The simplest (and default) {@link RemoteAddressResolver}.
 */
public class BasicRemoteAddressResolver implements RemoteAddressResolver {

    /**
     * Uses {@link HttpServletRequest#getRemoteAddr()} to resolve the REMOTE_ADDR.
     *
     * @param request HttpServletRequest
     * @return the IP address of the client or last proxy that sent the request.
     */
    public String getRemoteAddress(HttpServletRequest request) {
        return request.getRemoteAddr();
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy