Skip to content

Commit

Permalink
Merge pull request #5823 from mozilla/hardcode-hmc-ishub
Browse files Browse the repository at this point in the history
Hardcode HMC as a hub origin
  • Loading branch information
netpro2k committed Nov 29, 2022
2 parents 60feb81 + 70ffc0f commit e9f0798
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/utils/media-url-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,9 @@ export const guessContentType = url => {
};

const originIsHubsServer = new Map();
// HACK hubs.mozilla.com is now technically not a "hub" root, but we route existing links as if it is, so treat it as one.
originIsHubsServer.set("http://hubs.mozilla.com", true);
originIsHubsServer.set("https://hubs.mozilla.com", true);
async function isHubsServer(url) {
if (!url) return false;
if (!url.startsWith("http")) {
Expand Down

0 comments on commit e9f0798

Please sign in to comment.