mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-14 05:23:14 +00:00
log message if useProxies is disabled and X-Forwarded-For is set
This commit is contained in:
@@ -303,6 +303,9 @@ public class SolrLoggerServiceImpl implements SolrLoggerService, InitializingBea
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!isUseProxies() && request.getHeader("X-Forwarded-For") != null){
|
||||
log.warn("X-Forwarded-For header detected but useProxies is not enabled. If your dspace is behind a proxy set it to true");
|
||||
}
|
||||
|
||||
doc1.addField("ip", ip);
|
||||
|
||||
@@ -382,7 +385,9 @@ public class SolrLoggerServiceImpl implements SolrLoggerService, InitializingBea
|
||||
SolrInputDocument doc1 = new SolrInputDocument();
|
||||
// Save our basic info that we already have
|
||||
|
||||
|
||||
if (!isUseProxies() && xforwardedfor != null){
|
||||
log.warn("X-Forwarded-For header detected but useProxies is not enabled. If your dspace is behind a proxy set it to true");
|
||||
}
|
||||
if (isUseProxies() && xforwardedfor != null) {
|
||||
/* This header is a comma delimited list */
|
||||
for (String xfip : xforwardedfor.split(",")) {
|
||||
|
Reference in New Issue
Block a user