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 the broken analytics proxy #411

Merged
merged 1 commit into from
Aug 16, 2024
Merged

Fix the broken analytics proxy #411

merged 1 commit into from
Aug 16, 2024

Conversation

mveytsman
Copy link
Member

@mveytsman mveytsman commented Aug 16, 2024

Describe your changes

When I did #388 I was wondering why that parsers plug stuff was in the router not the endpoint!

I realize I put it in there following this guide: https://github.com/tallarium/reverse_proxy_plug?tab=readme-ov-file#usage-in-phoenix

Before #388 we wouldn't do the MethodOverride plug, which is what lets the frontend have buttons that use the DELETE method (it has a special parameter that MethodOverride turns into a DELETE methoded request).

After #388 we were parsing all requests, including those for the proxy to analytics, so the proxy wouldn't have any body to send when sending post requests.

I've now added a cache for bodies for requests to /analytics/* following the guide linked above

🤞

Checklist before requesting a review

  • I have performed a self-review of my code
  • If it is a core feature, I have added tests.
  • Are there other PRs or Issues that I should link to here?
  • Will this be part of a product update? If yes, please write one phrase
    about this update in the description above.

@mveytsman mveytsman merged commit 74d66bd into main Aug 16, 2024
1 check passed
@mveytsman mveytsman deleted the mv/fix_analytics_proxy branch August 16, 2024 21:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

1 participant