Parts of the file viewer being rewritten to the cdn

RESOLVED FIXED in 6.0.7

Status

addons.mozilla.org Graveyard
Developer Pages
RESOLVED FIXED
7 years ago
2 years ago

People

(Reporter: Andy McKay, Assigned: oremj)

Tracking

unspecified
6.0.7

Details

(Reporter)

Description

7 years ago
File viewer has the filename in the url. The filename could end with .js, and seems to get rewritten onto the CDN. 

For example:

https://addons.allizom.org/z/en-US/firefox/files/browse/115275/file/defaults/preferences/yslow.js

Becomes:

https://addons-cdn.allizom.org/z/en-US/firefox/files/browse/115275/file/defaults/preferences/yslow.js

Either we can a) stop using the filename in the file viewer (although I kind of like it) or b) white list /files/browse/ and /files/compare/ so they don't.
(Reporter)

Updated

7 years ago
Blocks: 645720
(Reporter)

Comment 1

7 years ago
After chatting to clouserw can we go with item b) please.
Assignee: nobody → jeremy.orem+bugs
(Assignee)

Comment 2

7 years ago
Did this in preview/next:

-    RewriteCond %1 \.(css|gif|ico|jpg|js|jsi18n|png|svg|woff)$
+    RewriteCond %1 \.(?:css|gif|ico|jpg|js|jsi18n|png|svg|woff)$
+    RewriteCond %1 !/files/(?:browse|compare)/


Can someone try it out?
(Reporter)

Comment 3

7 years ago
Don't think so, looks like the URL is still being rewritten.
(Assignee)

Comment 4

7 years ago
Should be fixed now.
Status: NEW → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → FIXED
(Reporter)

Comment 5

7 years ago
Looks good, thanks.
Product: addons.mozilla.org → addons.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.