Closed Bug 1052130 Opened 10 years ago Closed 10 years ago

[Wharfie] Serve Zamboni static/media assets through nginx rather than runserver

Categories

(Marketplace Graveyard :: General, defect, P3)

Avenir
x86
macOS
defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: jlockhart, Assigned: scolville)

References

Details

(Whiteboard: [qa-])

Presently, static assets are hosted directly using runserver which clutters the requests to Zamboni.  There should be a rule in nginx which hosts the static assets for the devhub directly.
Blocks: 1011198
Hint:

        # Conditionally handle media depending on where we are using referer (sic) header.
        location /media {
            proxy_set_header Host $host;
            if ($http_referer  ~ '^http://[^/]*?/mozpay') {
                proxy_pass http://webpay;
                break;
            }
            if ($http_referer !~ '^http://[^/]*?/(admin|developers|login\?to=/(admin|reviewers|developers)|files|lookup|media/css/(ecosystem|devreg|gaia|mkt)|reviewers|services)') {
                proxy_pass http://fireplace;
                break;
            }
            alias /home/ubuntu/zamboni/media/;
       }
    }
Priority: -- → P3
We should avoid at all costs needing the referer config, as it's a massive pain to maintain. 

This should be fine though as zamboni is now serving fireplace we shouldn't have conflicting /media locations.
Assignee: nobody → scolville
Status: NEW → ASSIGNED
https://github.com/mozilla/wharfie/commit/82e013900e6fe7a977565aa8c27dd55bd14eb497
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Whiteboard: [qa-]
You need to log in before you can comment on or make changes to this bug.