Closed stephen-sherman closed 1 week ago
Seems our documentation has got a bit our of date here, so sorry for the confusion if that turns out to be the case.
On the linked issue - I've added a comment there - but in fact those options weren't in the end released and hence that's why they aren't documented.
As of Forms 12, EnableRecordingOfIpWithFormSubmission
is disabled by default. So it might be just that you need to explicitly enable that by setting the option to true
.
If you've done that, it would be worth independently inspecting what you have coming through for httpContext.Connection.RemoteIpAddress
in your environment. As that's what is read by Forms to populate this field.
Meantime, I'll create a PR to get the docs up to date...
Thanks Andy, confirming that this was indeed caused by a change in the default setting of EnableRecordingOfIpWithFormSubmission
. It is now capturing IP addresses as expected with this explicitly set to true
.
Bug summary
Umbraco.Forms 13.1.2 records are missing an IP address when the site is behind Cloudflare CDN.
Specifics
Observed in multiple solutions running Umbraco.Forms 13.1.2 behind Cloudflare CDN.
EnableRecordingOfIpWithFormSubmission
configuration is enabled (by default, documentation).X-Forwarded-For
header is being populated with the user's IP address.This seems similar to Issue #1000, though I can't find any documentation about how to use the fix outlined therein.
Steps to reproduce
IP
column of the record in theUFRecords
database table.Expected result
The user's IP address is stored in the
IP
column of the record in theUFRecords
database table.Actual result
The
IP
column of the record in theUFRecords
database table is empty.