Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ajax requests send wrong "Content-Type" header #594

Open
2 tasks done
brotkrueml opened this issue Jan 2, 2025 · 0 comments
Open
2 tasks done

Ajax requests send wrong "Content-Type" header #594

brotkrueml opened this issue Jan 2, 2025 · 0 comments

Comments

@brotkrueml
Copy link
Contributor

  • I've read and understood the contribution guidelines.
  • I've searched for any related issues and avoided creating a duplicate issue.

Please give us a description of what happened.

The Ajax routes "savescores" and "prominentwords" send a HTTP request header "Content-Type" with value "text/plain". But the content in the payload is JSON, so it should be "application/json" instead to be correct.

This showed up using Modsecurity with the OWASP core rule set, as content-type in a request header with text/plain is blocked by default. As an exception rule can be defined, the correct value for the Content-Type header should be used instead.

Please describe what you expected to happen and why.

As the payload is JSON send "application/json" as Content-Type.

How can we reproduce this behavior?

Check the HTTP request header in the browser network console:

Screenshots

yoastseo

image

Technical info

  • TYPO3 version: 12.4.24
  • Yoast SEO version: 10.0.0
  • Relevant extensions in case of a bug: -
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant