---
schema_version: "1"
id: f3a755087c1955d12954060c0c89c9606a35700c0ccb563bacc4e1ef025fd0d8
title: Customize User-Agent Logging for CSRF Security
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/commerce/264-0-0/b2c_rn_25_10_customize_user_agent_log.md
canonical_url: https://help.salesforce.com/s/articleView?id=commerce.b2c_rn_25_10_customize_user_agent_log.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: ac16cc8258b91454565f609db3614642bd54d43470bf39674b81970a421cf7f8
description: Meet compliance requirements and strengthen security monitoring by customizing User-Agent logging strings during Cross-Site Request Forgery (CSRF) token validation. Previously, strings longer than 32 characters were truncated. Now, you can increase the number of characters to capture more detail. You can also turn off logging entirely or set the number of characters to less than 32 to balance storage efficiency with detail.
products:
  - Commerce
  - B2C Commerce
release: "264"
---
# Customize User-Agent Logging for CSRF Security

Meet compliance requirements and strengthen security monitoring by customizing User-Agent logging strings during Cross-Site Request Forgery (CSRF) token validation. Previously, strings longer than 32 characters were truncated. Now, you can increase the number of characters to capture more detail. You can also turn off logging entirely or set the number of characters to less than 32 to balance storage efficiency with detail.

**Where:** This change applies to B2C Commerce.

**How:** To enable custom CSRF token user agent log truncation, contact Salesforce Customer Support.

#### See Also

- [_Salesforce Help_: CSRF Protection in Business Manager](https://help.salesforce.com/s/articleView?id=cc.b2c_csrf_protection_in_business_manager.htm&language=en_US)