Repository navigation
fix: skip Content-Type on body-less requests and cover wallet rejections (#228, #233, #234) - #349
Merged
presidojay1 merged 1 commit intoOct 20, 2026
Conversation
A body-less GET still forced a CORS preflight because Content-Type was always set. Set the header only when a body is sent (StellarTickets#228). Add tests showing the Freighter rejection message on the marketplace buy (StellarTickets#234) and event publish (StellarTickets#233) actions.
|
@devwura Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
❌ Deploy Preview for stellartickets failed.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #228
Closes #233
Closes #234
Closes #229
apiFetchnow setsContent-Type: application/jsononly when a body is sent, so body-less GETs no longer force a CORS preflight. Tests cover both cases.getErrorMessagehelper, so no code change was needed.apiFetchalready wrapsfetchfailures in aNetworkError(status 0) with "Could not reach the server", andapi-timeout.test.tsalready asserts it. Referenced here for tracking only.Testing
npx eslint .passesnpx tsc --noEmitpassesnpm run buildsucceedsnpm testpassesThese checks were not run for this PR. The new tests are in
src/lib/api-fetch.test.ts,src/app/marketplace/page.test.tsxandsrc/app/dashboard/events/[id]/page.test.tsx. Please run them in CI or locally.