Get URL of the request sender with HttpServletRequest

后端 未结 3 670
抹茶落季
抹茶落季 2021-02-13 15:13

How do you get the source domain using HttpServletRequest? Source domain is the requester\'s domain.

Thanks.

3条回答
  •  南方客
    南方客 (楼主)
    2021-02-13 15:39

    To get the source domain you can use request.getHeader("origin") especially if the requests have to pass through a proxy server.

提交回复
热议问题