Closed
Bug 876440
Opened 12 years ago
Closed 12 years ago
Implement S3 redirects for /edit and /remix routes
Categories
(Webmaker Graveyard :: Thimble, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: michiel, Assigned: michiel)
References
Details
(Whiteboard: s=2013w22)
Attachments
(1 file)
Published pages will be published "for real" as some database rowid, and can be remixed on that value. When we publish to a named XYZ.mywebmaker.org domain, we publish based on the page's title, so if I have a page with title "moderately caffeinated", I will publish to pomax.mywebmaker.org/moderately-caffeinated and while the "remix this" link will point to the correct thing, adding /edit at the end of that URL will not take us back to the thimble app.
Can we tackle this with a routing table "somewhere" that autoresolves /edit links to the correct location, or do we need more drastic measures here?
Comment 2•12 years ago
|
||
There is no global routing table anywhere, visiting "jbuck.mywebmaker.org/thimble/not-caffeinated" will proxy to "mywebmaker.s3.amazonaws.com/jbuck/thimble/not-caffeinated". If you want to have /edit links hanging off every make, then you'll need to publish an additional page to S3 that is makeURL + "/edit".
the problem here is that we don't want an extra page, we need the /edit link to load thimble as if it's calling thimble.wm.o/remix/[some number], so publishing a new page won't actually help us there, unless we can "publish" a redirect? i.e. rather than content publish a 300?
Comment 4•12 years ago
|
||
That is exactly what you can do! You can take a peek at the documentation ( http://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectPUT.html ) but the key idea is PUT a 0-byte object with the header "x-amz-website-redirect-location" set to whatever URL you want to redirect to.
ooh, excellent.
Assignee: nobody → pomax
Status: NEW → ASSIGNED
Updated•12 years ago
|
Summary: Adding /edit to the end of a myname.mywebmaker.org/page-title link does not work → Implement S3 redirects for /edit and /remix routes
Whiteboard: s=2013w22
I tried putting in these two redirects, but they do not seem to be taking. I probably forgot something really obvious, how good are your eyes?
Attachment #754841 -
Flags: feedback?(jon)
Comment on attachment 754841 [details] [review]
https://github.com/mozilla/thimble.webmaker.org/pull/81
alright, fixed up to work, with a followup bug to make it work "nicer". But this definitely works.
Attachment #754841 -
Flags: feedback?(jon) → review?(jon)
Comment 8•12 years ago
|
||
Comment on attachment 754841 [details] [review]
https://github.com/mozilla/thimble.webmaker.org/pull/81
r+ with nits noted in the pull request
Updated•12 years ago
|
Attachment #754841 -
Flags: review?(jon) → review+
Comment 9•12 years ago
|
||
Commit pushed to master at https://github.com/mozilla/thimble.webmaker.org
https://github.com/mozilla/thimble.webmaker.org/commit/0994661d5c58dfe78004b66a7d6e2e75b143e01b
Merge pull request #81 from Pomax/Bug876440
added redirect publication to S3
| Assignee | ||
Comment 10•12 years ago
|
||
landed
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Comment 11•12 years ago
|
||
Matt/Scott, make sure you're aware of this bug so we can do the same in Popcorn Maker. Do we already have a bug?
Comment 12•12 years ago
|
||
Unsure if it's something that's on the radar.
I'll look over what it took here and check out what's being done in Scotts ticket for the Popcorn Maker implementation.
Updated•12 years ago
|
Attachment mime type: text/plain → text/x-github-pull-request
You need to log in
before you can comment on or make changes to this bug.
Description
•