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

Fix layout response for non-existent pages in RAV #2016

Merged
merged 2 commits into from
Jan 22, 2025
Merged

Conversation

addy-pathania
Copy link
Contributor

@addy-pathania addy-pathania commented Jan 22, 2025

Description / Motivation

The native fetch API was identifying the layout request as a complex request due to the explicitly set Content-Type header, which caused it to send an additional OPTIONS preflight request. This preflight request led to a CORS error, preventing the subsequent GET request from completing successfully. By removing the Content-Type header, the default headers for the HTTP request now satisfy the criteria for a simple request. This avoids triggering the preflight OPTIONS request and allows the GET request to complete as intended.

Testing Details

  • Unit Test Added
  • Manual Test/Other (Please elaborate)

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

@addy-pathania addy-pathania requested a review from a team January 22, 2025 20:36
@addy-pathania addy-pathania merged commit f734384 into dev Jan 22, 2025
1 check passed
@addy-pathania addy-pathania deleted the bugfix/jss-4921 branch January 22, 2025 20:58
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

Successfully merging this pull request may close these issues.

3 participants