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

/receipts/ endpoint encounters CORS errors when using custom header for attachment authentication #32703

Closed
blimpich opened this issue Dec 8, 2023 · 12 comments
Assignees
Labels
Daily KSv2 Engineering Internal Requires API changes or must be handled by Expensify staff Reviewing Has a PR in review

Comments

@blimpich
Copy link
Contributor

blimpich commented Dec 8, 2023

Summary:

We have a goal to shift attachment authentication to a custom header, eliminating the need to append a token to the URL. This change allows for more efficient caching since the URL remains consistent. However, in doing this we encounter CORS errors. See this comment for more details.

We had this same problem with the /chat-attachment/ which was solved by these two PRs (1 & 2). We need to do the same for the receipts endpoint. This caused this deploy blocker recently.

Solution:

Configure our CORS settings in the backend so that the /receipts/ endpoint is like the /chat-attachment/ endpoint and allows these custom headers.

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~013d594876a09efc2c
  • Upwork Job ID: 1732925899350822912
  • Last Price Increase: 2023-12-08
@blimpich blimpich added Daily KSv2 Internal Requires API changes or must be handled by Expensify staff labels Dec 8, 2023
@blimpich blimpich self-assigned this Dec 8, 2023
Copy link

melvin-bot bot commented Dec 8, 2023

Job added to Upwork: https://www.upwork.com/jobs/~013d594876a09efc2c

Copy link

melvin-bot bot commented Dec 8, 2023

Triggered auto assignment to Contributor Plus for review of internal employee PR - @burczu (Internal)

@blimpich
Copy link
Contributor Author

blimpich commented Dec 8, 2023

@burczu not sure if you need to be assigned to this issue. This issue has to be completed internally, but I created the issue in Expensify/App so that my progress on it could be visible to those interested in it.

Copy link

melvin-bot bot commented Dec 11, 2023

@blimpich Whoops! This issue is 2 days overdue. Let's get this updated quick!

@blimpich
Copy link
Contributor Author

Haven't had time to work on this yet. Hoping to get to it this week.

@melvin-bot melvin-bot bot removed the Overdue label Dec 11, 2023
@blimpich blimpich added Weekly KSv2 and removed Daily KSv2 labels Dec 13, 2023
@blimpich
Copy link
Contributor Author

Making this weekly until I can prioritize it over other tickets. This will be high on my list once I deal with more urgent issues since it is blocking other people's work.

@blimpich
Copy link
Contributor Author

Not prioritized, swamped with other chore / auto-assigned work.

@melvin-bot melvin-bot bot removed the Overdue label Dec 22, 2023
@roryabraham
Copy link
Contributor

I think this should be treated as a top priority. Image caching is blocking a whole suite of other issues and has been in-progress for years now (since Spain OffShore IIRC).

@roryabraham roryabraham added Daily KSv2 and removed Weekly KSv2 labels Dec 29, 2023
@melvin-bot melvin-bot bot added the Overdue label Jan 1, 2024
Copy link

melvin-bot bot commented Jan 2, 2024

@blimpich Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@blimpich
Copy link
Contributor Author

blimpich commented Jan 3, 2024

I agree that this is high priority work, but it wasn't part of a commitment for EOY so I did not prioritize it. Now that it is the new year I hope that I can work on this soon, though I still consider it less important than regressions that are actively hurting customer experience, which is what I'm currently prioritizing.

@blimpich
Copy link
Contributor Author

blimpich commented Jan 5, 2024

Taking another crack at this today.

@blimpich
Copy link
Contributor Author

blimpich commented Jan 5, 2024

Success! Was able to verify locally after looking at this with fresh eyes. Will update PRs and add reviewers shortly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Daily KSv2 Engineering Internal Requires API changes or must be handled by Expensify staff Reviewing Has a PR in review
Projects
None yet
Development

No branches or pull requests

3 participants