1
0
Fork 0
forked from OpenNeo/impress
impress/app/models
Emi Dunn-Rankin fe9adb5766
Oops, fix mall spider bug, added by our HTTPS fix
Oh, yeah, shit, okay, when we set `self.url` like that, it's supposed to be the _canonical_ URL for the SWF, not our proxied one—this is the URL that's gonna go in the database.

We do proxying late in the process, like when we're actually setting up to download something, but for just referencing where the asset lives, we use `images.neopets.com`.

In this change, we revert the use of `NEOPETS_IMAGES_URL_ORIGIN`, but we _do_ update this to `https` for good measure. (We currently have both HTTP and HTTPS urls in the database, I guess neopets.com started serving different URLs at some point, this is probably the future! And anything interpreting these URLs will need to handle both cases anyway, unless we do some kind of migration update situation thing.)

We're migrating the incorrect assets with the following query (with the limit changed to match the number we currently see in the DB, just as a safety check):
```
UPDATE swf_assets SET url = REPLACE(url, 'http://images.neopets-asset-proxy.openneo.net', 'https://images.neopets.com') WHERE url LIKE 'http://images.neopets-asset-proxy.openneo.net%' ORDER BY id LIMIT 2000;
```
2022-08-23 03:04:54 -07:00
..
item
asset_image_conversion_request.rb timeout on background jobs 2012-11-04 12:01:03 -06:00
campaign.rb
closet_group.rb
closet_hanger.rb
closet_hanger_observer.rb
closet_list.rb
closet_list_observer.rb
closet_visibility.rb
color.rb
contribution.rb
contribution_observer.rb
donation.rb
donation_feature.rb stop breaking on donations that delete their outfit 2015-02-25 13:42:35 -06:00
fragment_expiration.rb
fragment_localization.rb
image.rb
item.rb
item_observer.rb
item_outfit_relationship.rb
neopets_connection.rb
neopets_page.rb
neopets_user.rb
news_post.rb
outfit.rb Use outfits.openneo-assets.net, bc petpage bug 2021-06-19 09:10:25 -07:00
outfit_image_update.rb
outfit_image_uploader.rb
parent_swf_asset_relationship.rb
pet.rb
pet_attribute.rb
pet_state.rb
pet_type.rb
pet_type_observer.rb
pretty_param.rb
roulette.rb
species.rb
static_resource.rb
swf_asset.rb Oops, fix mall spider bug, added by our HTTPS fix 2022-08-23 03:04:54 -07:00
user.rb
user_sweeper.rb
wardrobe_tip.rb
zone.rb