Skip to content
This repository has been archived by the owner on Nov 30, 2022. It is now read-only.

Accepting a post request with data via proxy middleware fails proxy signature verification #53

Closed
lmartins opened this issue Jul 18, 2018 · 2 comments

Comments

@lmartins
Copy link

Hi,

I hope this is not too broad of a question, but I'm having issues accepting an ajax post request in the laravel-shopify app.
I've excluded this particular path from the CSRF verification on VerifyCsrfToken class, and the request does come in. However, if I pass any data to the request I get a 401 Unauthorized error, with the following on the request response preview

exception: "Symfony\Component\HttpKernel\Exception\HttpException"
file : "app/vendor/laravel/framework/src/Illuminate/Foundation/Application.php"
line : 942
message : "Invalid proxy signature"

If I don't pass any data on the request, it does go through.

For a little more context, this request is coming from a react application that is running proxy app requests. I have several working just fine, it was just now that I needed a post request that I ran into problems.

Any help much appreciated. Thank you!

@gnikyt
Copy link
Owner

gnikyt commented Jul 20, 2018

Someone else can chime in if I'm wrong, but I believe you can't do POST requests? I believe its strictly designed to GET only. As you request the URL, Shopify does a GET request to your app + path, then returns the result.

@lmartins
Copy link
Author

@ohmybrew ah ok, that makes sense. I'll pass the data via query params then.
Thank you Tyler!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants