Closed
Bug 1065006
Opened 11 years ago
Closed 11 years ago
in-app product APIs cause 404s because of misinterpreted app origins
Categories
(Marketplace Graveyard :: Payments/Refunds, defect, P1)
Tracking
(Not tracked)
VERIFIED
FIXED
2014-09-16
People
(Reporter: kumar, Assigned: kumar)
References
Details
See bug 1064690 for STR
When the dev hub makes an API request it does so like this:
https://marketplace.allizom.org/api/v1/payments/app%3A//fxpay.allizom.org/in-app/
which works locally on Django's runserver but not on our nginx web servers. Maybe it's the double slash, who knows.
Anyway, the origin is technically not encoded right. If you do it from JavaScript (which the fxpay lib does, the encoding looks like:
https://marketplace.allizom.org/api/v1/payments/app%3A%2F%2Ffxpay.allizom.org/in-app/
This seems to be a bug in Django's reverse: https://github.com/mozilla/zamboni/blob/master/mkt/developers/templates/developers/payments/in-app-products.html#L54
but needs more investigation.
Assignee | ||
Comment 1•11 years ago
|
||
more info:
>>> from django.core.urlresolvers import reverse
>>> reverse('in-app-products-list', args=['app://fxpay.allizom.org'])
'/api/v1/payments/app%3A//fxpay.allizom.org/in-app/'
Assignee | ||
Updated•11 years ago
|
Assignee: nobody → kumar.mcmillan
Assignee | ||
Comment 2•11 years ago
|
||
I've proposed a patch for review: https://github.com/mozilla/zamboni/pull/2527
Assignee | ||
Comment 3•11 years ago
|
||
fixed in the patch above. This will go on stage Wednesday at 12pm PST. We can push it sooner if you need it.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → 2014-09-16
Assignee | ||
Comment 4•11 years ago
|
||
Hmm, this patch works locally but not on our servers :(
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Assignee | ||
Comment 5•11 years ago
|
||
something is weird on the server. I filed bug 1065742
Depends on: 1065742
Assignee | ||
Comment 6•11 years ago
|
||
The nginx fix from bug 1065742 has been applied to dev, stage, and pay-alt. It is in deploy notes for next push.
Status: REOPENED → RESOLVED
Closed: 11 years ago → 11 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•