Serve images from uploads instead of cdn2. cdn2 redirects to uploads already anyway.

This commit is contained in:
picklesrus 2022-04-21 14:54:41 -04:00
parent e9abb0db4f
commit 96650c3fe0
7 changed files with 43 additions and 43 deletions

View file

@ -52,8 +52,8 @@ env:
- TEST_PROJECT_ID_VAR=TEST_PROJECT_ID_$TRAVIS_BRANCH
- TEST_PROJECT_ID=${!TEST_PROJECT_ID_VAR}
- TEST_PROJECT_ID=${TEST_PROJECT_ID:-$TEST_PROJECT_ID_STAGING}
- STATIC_HOST_master=https://cdn2.scratch.mit.edu
- STATIC_HOST_STAGING=https://cdn.scratch.ly
- STATIC_HOST_master=https://uploads.scratch.mit.edu
- STATIC_HOST_STAGING=https://uploads.scratch.ly
- STATIC_HOST_VAR=STATIC_HOST_$TRAVIS_BRANCH
- STATIC_HOST=${!STATIC_HOST_VAR}
- STATIC_HOST=${STATIC_HOST:-$STATIC_HOST_STAGING}

View file

@ -16,7 +16,7 @@ Avatar.propTypes = {
};
Avatar.defaultProps = {
src: '//cdn2.scratch.mit.edu/get_image/user/2584924_24x24.png?v=1438702210.96'
src: '//uploads.scratch.mit.edu/get_image/user/2584924_24x24.png?v=1438702210.96'
};
module.exports = Avatar;

View file

@ -20,14 +20,14 @@ const PeopleGrid = props => (
>
<Avatar
alt=""
src={`https://cdn.scratch.mit.edu/get_image/user/${person.userId || 'default'}_80x80.png`}
src={`https://uploads.scratch.mit.edu/get_image/user/${person.userId || 'default'}_80x80.png`}
/>
</a>
) : (
/* if userName is not given, there's no chance userId is given */
<Avatar
alt=""
src={`https://cdn.scratch.mit.edu/get_image/user/default_80x80.png`}
src={`https://uploads.scratch.mit.edu/get_image/user/default_80x80.png`}
/>
)}
</div>

View file

@ -5,7 +5,7 @@
"id": 61730637,
"username": "-pug_arts-"
},
"image": "https://cdn2.scratch.mit.edu/get_image/project/423104626_144x108.png",
"image": "https://uploads.scratch.mit.edu/get_image/project/423104626_144x108.png",
"title": "♡ BLM ART! ♡",
"stats": {}
},
@ -15,7 +15,7 @@
"id": 60051701,
"username": "-MayThe4thBeWithYou-"
},
"image": "https://cdn2.scratch.mit.edu/get_image/project/404637877_144x108.png",
"image": "https://uploads.scratch.mit.edu/get_image/project/404637877_144x108.png",
"title": "Can't Breathe",
"stats": {}
},
@ -25,7 +25,7 @@
"id": 28599090,
"username": "BubbleMint-"
},
"image": "https://cdn2.scratch.mit.edu/get_image/project/404286089_144x108.png",
"image": "https://uploads.scratch.mit.edu/get_image/project/404286089_144x108.png",
"title": "In Memory of George Floyd || ♡",
"stats": {}
},
@ -35,7 +35,7 @@
"id": 58796616,
"username": "-bIueberryonthemoon-"
},
"image": "https://cdn2.scratch.mit.edu/get_image/project/408116876_144x108.png",
"image": "https://uploads.scratch.mit.edu/get_image/project/408116876_144x108.png",
"title": "Justice for Breonna Taylor ❤️",
"stats": {}
}

View file

@ -1789,7 +1789,7 @@ class AnnualReport extends React.Component {
alt={this.props.intl.formatMessage(
{id: 'annualReport.2020.altAvatar'}
)}
src="https://cdn2.scratch.mit.edu/get_image/user/36591_60x60.png"
src="https://uploads.scratch.mit.edu/get_image/user/36591_60x60.png"
/>
<div>
<h5>
@ -1810,7 +1810,7 @@ class AnnualReport extends React.Component {
alt={this.props.intl.formatMessage(
{id: 'annualReport.2020.altAvatar'}
)}
src="https://cdn2.scratch.mit.edu/get_image/user/61442584_60x60.png"
src="https://uploads.scratch.mit.edu/get_image/user/61442584_60x60.png"
/>
<div>
<h5>
@ -1852,7 +1852,7 @@ class AnnualReport extends React.Component {
alt={this.props.intl.formatMessage(
{id: 'annualReport.2020.altAvatar'}
)}
src="https://cdn2.scratch.mit.edu/get_image/user/176301_60x60.png"
src="https://uploads.scratch.mit.edu/get_image/user/176301_60x60.png"
/>
<div>
<h5>

View file

@ -4,7 +4,7 @@
"id": 10128067,
"type": "project",
"title": "Dance Party",
"image": "https://cdn2.scratch.mit.edu/get_image/project/10128067_144x108.png",
"image": "https://uploads.scratch.mit.edu/get_image/project/10128067_144x108.png",
"author": {"username": "Scratchteam"},
"href": "https://scratch.mit.edu/projects/10128067/",
"stats": {"loves": 0, "remixes": 0}
@ -13,7 +13,7 @@
"id": 10015059,
"type": "project",
"title": "Animate the Crab",
"image": "https://cdn2.scratch.mit.edu/get_image/project/10015059_144x108.png",
"image": "https://uploads.scratch.mit.edu/get_image/project/10015059_144x108.png",
"author": {"username": "Scratchteam"},
"href": "https://scratch.mit.edu/projects/10015059/",
"stats": {"loves": 0, "remixes": 0}
@ -22,7 +22,7 @@
"id": 10015060,
"type": "project",
"title": "The Pico Show: Intro",
"image": "https://cdn2.scratch.mit.edu/get_image/project/10015060_144x108.png",
"image": "https://uploads.scratch.mit.edu/get_image/project/10015060_144x108.png",
"author": {"username": "Scratchteam"},
"href": "https://scratch.mit.edu/projects/10015060/",
"stats": {"loves": 0, "remixes": 0}
@ -31,7 +31,7 @@
"id": 11806234,
"type": "project",
"title": "Greeting Card",
"image": "https://cdn2.scratch.mit.edu/get_image/project/11806234_144x108.png",
"image": "https://uploads.scratch.mit.edu/get_image/project/11806234_144x108.png",
"author": {"username": "Scratchteam"},
"href": "https://scratch.mit.edu/projects/11806234/",
"stats": {"loves": 0, "remixes": 0}
@ -40,7 +40,7 @@
"id": 10128197,
"type": "project",
"title": "Teens at the Castle",
"image": "https://cdn2.scratch.mit.edu/get_image/project/10128197_144x108.png",
"image": "https://uploads.scratch.mit.edu/get_image/project/10128197_144x108.png",
"author": {"username": "Scratchteam"},
"href": "https://scratch.mit.edu/projects/10128197/",
"stats": {"loves": 0, "remixes": 0}
@ -51,7 +51,7 @@
"id": 10128515,
"type": "project",
"title": "Pong Starter",
"image": "https://cdn2.scratch.mit.edu/get_image/project/10128515_144x108.png",
"image": "https://uploads.scratch.mit.edu/get_image/project/10128515_144x108.png",
"author": {"username": "Scratchteam"},
"href": "https://scratch.mit.edu/projects/10128515/",
"stats": {"loves": 0, "remixes": 0}
@ -60,7 +60,7 @@
"id": 10128431,
"type": "project",
"title": "Maze Starter",
"image": "https://cdn2.scratch.mit.edu/get_image/project/10128431_144x108.png",
"image": "https://uploads.scratch.mit.edu/get_image/project/10128431_144x108.png",
"author": {"username": "Scratchteam"},
"href": "https://scratch.mit.edu/projects/10128431/",
"stats": {"loves": 0, "remixes": 0}
@ -69,7 +69,7 @@
"id": 10128368,
"type": "project",
"title": "Hide and Seek",
"image": "https://cdn2.scratch.mit.edu/get_image/project/10128368_144x108.png",
"image": "https://uploads.scratch.mit.edu/get_image/project/10128368_144x108.png",
"author": {"username": "Scratchteam"},
"href": "https://scratch.mit.edu/projects/10128368/",
"stats": {"loves": 0, "remixes": 0}
@ -78,7 +78,7 @@
"id": 11656680,
"type": "project",
"title": "Dress Up Tera",
"image": "https://cdn2.scratch.mit.edu/get_image/project/11656680_144x108.png",
"image": "https://uploads.scratch.mit.edu/get_image/project/11656680_144x108.png",
"author": {"username": "Scratchteam"},
"href": "https://scratch.mit.edu/projects/11656680/",
"stats": {"loves": 0, "remixes": 0}
@ -87,7 +87,7 @@
"id": 10866073,
"type": "project",
"title": "Snowboarding",
"image": "https://cdn2.scratch.mit.edu/get_image/project/10866073_144x108.png",
"image": "https://uploads.scratch.mit.edu/get_image/project/10866073_144x108.png",
"author": {"username": "Scratchteam"},
"href": "https://scratch.mit.edu/projects/10866073/",
"stats": {"loves": 0, "remixes": 0}
@ -98,7 +98,7 @@
"id": 10015857,
"type": "project",
"title": "Paint with Gobo",
"image": "https://cdn2.scratch.mit.edu/get_image/project/10015857_144x108.png",
"image": "https://uploads.scratch.mit.edu/get_image/project/10015857_144x108.png",
"author": {"username": "Scratchteam"},
"href": "https://scratch.mit.edu/projects/10015857/",
"stats": {"loves": 0, "remixes": 0}
@ -107,7 +107,7 @@
"id": 11829803,
"type": "project",
"title": "Wizard Spells",
"image": "https://cdn2.scratch.mit.edu/get_image/project/11829803_144x108.png",
"image": "https://uploads.scratch.mit.edu/get_image/project/11829803_144x108.png",
"author": {"username": "Scratchteam"},
"href": "https://scratch.mit.edu/projects/11829803/",
"stats": {"loves": 0, "remixes": 0}
@ -116,7 +116,7 @@
"id": 10007296,
"type": "project",
"title": "Soundflower",
"image": "https://cdn2.scratch.mit.edu/get_image/project/10007296_144x108.png",
"image": "https://uploads.scratch.mit.edu/get_image/project/10007296_144x108.png",
"author": {"username": "Scratchteam"},
"href": "https://scratch.mit.edu/projects/10007296/",
"stats": {"loves": 0, "remixes": 0}
@ -125,7 +125,7 @@
"id": 11641125,
"type": "project",
"title": "Spiral Maker",
"image": "https://cdn2.scratch.mit.edu/get_image/project/11641125_144x108.png",
"image": "https://uploads.scratch.mit.edu/get_image/project/11641125_144x108.png",
"author": {"username": "Scratchteam"},
"href": "https://scratch.mit.edu/projects/11641125/",
"stats": {"loves": 0, "remixes": 0}
@ -134,7 +134,7 @@
"id": 259169999,
"type": "project",
"title": "Dancing Drawings",
"image": "https://cdn2.scratch.mit.edu/get_image/project/259169999_144x108.png",
"image": "https://uploads.scratch.mit.edu/get_image/project/259169999_144x108.png",
"author": {"username": "shruti"},
"href": "https://scratch.mit.edu/projects/259169999/",
"stats": {"loves": 0, "remixes": 0}
@ -145,7 +145,7 @@
"id": 10015792,
"type": "project",
"title": "Remix this Dance!",
"image": "https://cdn2.scratch.mit.edu/get_image/project/10015792_144x108.png",
"image": "https://uploads.scratch.mit.edu/get_image/project/10015792_144x108.png",
"author": {"username": "Scratchteam"},
"href": "https://scratch.mit.edu/projects/10015792/",
"stats": {"loves": 0, "remixes": 0}
@ -154,7 +154,7 @@
"id": 10012676,
"type": "project",
"title": "Piano",
"image": "https://cdn2.scratch.mit.edu/get_image/project/10012676_144x108.png",
"image": "https://uploads.scratch.mit.edu/get_image/project/10012676_144x108.png",
"author": {"username": "Scratchteam"},
"href": "https://scratch.mit.edu/projects/10012676/",
"stats": {"loves": 0, "remixes": 0}
@ -163,7 +163,7 @@
"id": 10128483,
"type": "project",
"title": "Starfish Choir",
"image": "https://cdn2.scratch.mit.edu/get_image/project/10128483_144x108.png",
"image": "https://uploads.scratch.mit.edu/get_image/project/10128483_144x108.png",
"author": {"username": "Scratchteam"},
"href": "https://scratch.mit.edu/projects/10128483/",
"stats": {"loves": 0, "remixes": 0}
@ -172,7 +172,7 @@
"id": 11640429,
"type": "project",
"title": "DJ Scratch Cat",
"image": "https://cdn2.scratch.mit.edu/get_image/project/11640429_144x108.png",
"image": "https://uploads.scratch.mit.edu/get_image/project/11640429_144x108.png",
"author": {"username": "Scratchteam"},
"href": "https://scratch.mit.edu/projects/11640429/",
"stats": {"loves": 0, "remixes": 0}
@ -181,7 +181,7 @@
"id": 10408883,
"type": "project",
"title": "Code a Dance",
"image": "https://cdn2.scratch.mit.edu/get_image/project/10408883_144x108.png",
"image": "https://uploads.scratch.mit.edu/get_image/project/10408883_144x108.png",
"author": {"username": "Scratchteam"},
"href": "https://scratch.mit.edu/projects/10408883/",
"stats": {"loves": 0, "remixes": 0}
@ -192,7 +192,7 @@
"id": 10014866,
"type": "project",
"title": "5 Random Facts about Me",
"image": "https://cdn2.scratch.mit.edu/get_image/project/10014866_144x108.png",
"image": "https://uploads.scratch.mit.edu/get_image/project/10014866_144x108.png",
"author": {"username": "Scratchteam"},
"href": "https://scratch.mit.edu/projects/10014866/",
"stats": {"loves": 0, "remixes": 0}
@ -201,7 +201,7 @@
"id": 10063757,
"type": "project",
"title": "Introducing Howler! Remix",
"image": "https://cdn2.scratch.mit.edu/get_image/project/10063757_144x108.png",
"image": "https://uploads.scratch.mit.edu/get_image/project/10063757_144x108.png",
"author": {"username": "Scratchteam"},
"href": "https://scratch.mit.edu/projects/10063757/",
"stats": {"loves": 0, "remixes": 0}
@ -210,7 +210,7 @@
"id": 10128197,
"type": "project",
"title": "Teens at the Castle",
"image": "https://cdn2.scratch.mit.edu/get_image/project/10128197_144x108.png",
"image": "https://uploads.scratch.mit.edu/get_image/project/10128197_144x108.png",
"author": {"username": "Scratchteam"},
"href": "https://scratch.mit.edu/projects/10128197/",
"stats": {"loves": 0, "remixes": 0}
@ -219,7 +219,7 @@
"id": 11804271,
"type": "project",
"title": "Virtual Tour",
"image": "https://cdn2.scratch.mit.edu/get_image/project/11804271_144x108.png",
"image": "https://uploads.scratch.mit.edu/get_image/project/11804271_144x108.png",
"author": {"username": "Scratchteam"},
"href": "https://scratch.mit.edu/projects/11804271/",
"stats": {"loves": 0, "remixes": 0}
@ -228,7 +228,7 @@
"id": 10015868,
"type": "project",
"title": "Digital Story",
"image": "https://cdn2.scratch.mit.edu/get_image/project/10015868_144x108.png",
"image": "https://uploads.scratch.mit.edu/get_image/project/10015868_144x108.png",
"author": {"username": "Scratchteam"},
"href": "https://scratch.mit.edu/projects/10015868/",
"stats": {"loves": 0, "remixes": 0}
@ -239,7 +239,7 @@
"id": 10128168,
"type": "project",
"title": "Musical Buttons",
"image": "https://cdn2.scratch.mit.edu/get_image/project/10128168_144x108.png",
"image": "https://uploads.scratch.mit.edu/get_image/project/10128168_144x108.png",
"author": {"username": "Scratchteam"},
"href": "https://scratch.mit.edu/projects/10128168/",
"stats": {"loves": 0, "remixes": 0}
@ -248,7 +248,7 @@
"id": 10128119,
"type": "project",
"title": "Bubbles with Video Sensing",
"image": "https://cdn2.scratch.mit.edu/get_image/project/10128119_144x108.png",
"image": "https://uploads.scratch.mit.edu/get_image/project/10128119_144x108.png",
"author": {"username": "Scratchteam"},
"href": "https://scratch.mit.edu/projects/10128119/",
"stats": {"loves": 0, "remixes": 0}
@ -257,7 +257,7 @@
"id": 10123832,
"type": "project",
"title": "Save the Mini-Figs!",
"image": "https://cdn2.scratch.mit.edu/get_image/project/10123832_144x108.png",
"image": "https://uploads.scratch.mit.edu/get_image/project/10123832_144x108.png",
"author": {"username": "Scratchteam"},
"href": "https://scratch.mit.edu/projects/10123832/",
"stats": {"loves": 0, "remixes": 0}
@ -266,7 +266,7 @@
"id": 10015802,
"type": "project",
"title": "Pizza Chef",
"image": "https://cdn2.scratch.mit.edu/get_image/project/10015802_144x108.png",
"image": "https://uploads.scratch.mit.edu/get_image/project/10015802_144x108.png",
"author": {"username": "Scratchteam"},
"href": "https://scratch.mit.edu/projects/10015802/",
"stats": {"loves": 0, "remixes": 0}
@ -275,7 +275,7 @@
"id": 63809044,
"type": "project",
"title": "Soccer Video Sensing",
"image": "https://cdn2.scratch.mit.edu/get_image/project/63809044_144x108.png",
"image": "https://uploads.scratch.mit.edu/get_image/project/63809044_144x108.png",
"author": {"username": "natalie"},
"href": "https://scratch.mit.edu/projects/63809044/",
"stats": {"loves": 0, "remixes": 0}

View file

@ -229,7 +229,7 @@ module.exports = {
'process.env.BACKPACK_HOST': '"' + (process.env.BACKPACK_HOST || 'https://backpack.scratch.mit.edu') + '"',
'process.env.CLOUDDATA_HOST': '"' + (process.env.CLOUDDATA_HOST || 'clouddata.scratch.mit.edu') + '"',
'process.env.PROJECT_HOST': '"' + (process.env.PROJECT_HOST || 'https://projects.scratch.mit.edu') + '"',
'process.env.STATIC_HOST': '"' + (process.env.STATIC_HOST || 'https://cdn2.scratch.mit.edu') + '"',
'process.env.STATIC_HOST': '"' + (process.env.STATIC_HOST || 'https://uploads.scratch.mit.edu') + '"',
'process.env.SCRATCH_ENV': '"' + (process.env.SCRATCH_ENV || 'development') + '"',
'process.env.SENTRY_DSN': '"' + (process.env.SENTRY_DSN || '') + '"'
})