Skip to content

fix(pds-multiselect): add csrfHeaderName prop#657

Merged
QuintonJason merged 5 commits intomainfrom
fix/csrfheader-update
Feb 3, 2026
Merged

fix(pds-multiselect): add csrfHeaderName prop#657
QuintonJason merged 5 commits intomainfrom
fix/csrfheader-update

Conversation

@QuintonJason
Copy link
Contributor

@QuintonJason QuintonJason commented Feb 3, 2026

Description

The component documentation showed a csrfHeaderName prop, but it wasn't actually implemented. The CSRF header was hardcoded to 'X-CSRF-Token' in both async fetch and create operations, preventing users from customizing it for frameworks that use different conventions (e.g., Django uses X-CSRFToken, Express may use X-XSRF-Token).

Solution

  • Added csrfHeaderName prop with default value 'X-CSRF-Token'
  • Updated fetchOptions() method to use configurable header name
  • Updated createOption() method to use configurable header name
  • Updated TypeScript definitions for both web component and React usage

Fixes DSS-125

Type of change

Please delete options that are not relevant.
If your type of change is not present, add that option.

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

Please describe the tests you've added and run to verify your changes.
Provide instructions so that we can reproduce.
Please also list any relevant details for your test configuration.

  • unit tests
  • e2e tests
  • accessibility tests
  • tested manually
  • other:

Test Configuration:

  • Pine versions:
  • OS:
  • Browsers:
  • Screen readers:
  • Misc:

Checklist:

If not applicable, leave options unchecked.

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing tests pass locally with my changes
  • Design has QA'ed and approved this PR

@QuintonJason QuintonJason self-assigned this Feb 3, 2026
@netlify
Copy link

netlify bot commented Feb 3, 2026

Deploy Preview for pine-design-system ready!

Name Link
🔨 Latest commit d75abec
🔍 Latest deploy log https://app.netlify.com/projects/pine-design-system/deploys/6982676d115da1000898f8f0
😎 Deploy Preview https://deploy-preview-657--pine-design-system.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions github-actions bot added bug Something isn't working package: core Changes have been made to the Core package package: react Changes have been made to the React package package: doc-componenets labels Feb 3, 2026
@QuintonJason QuintonJason marked this pull request as ready for review February 3, 2026 21:26
Copy link
Member

@pixelflips pixelflips left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems fine to me. :shipit: Maybe run coderabbit just for an extra check.

@pixelflips
Copy link
Member

Also some weird labels on the PR, but not sure if that effects anything or not.

@QuintonJason QuintonJason removed package: core Changes have been made to the Core package package: react Changes have been made to the React package package: doc-componenets labels Feb 3, 2026
@QuintonJason QuintonJason merged commit dfca90d into main Feb 3, 2026
15 checks passed
@QuintonJason QuintonJason deleted the fix/csrfheader-update branch February 3, 2026 21:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants