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
campaign.rb
closet_group.rb import items to a specific list 2013-04-09 15:50:33 -05:00
closet_hanger.rb oh huh. looks like remove/move are ready. 2015-09-26 19:55:09 -07:00
closet_hanger_observer.rb
closet_list.rb
closet_list_observer.rb oh poo, didn't commit these properly with the closet hanger caching :( 2013-12-27 21:48:38 -05:00
closet_visibility.rb
color.rb
contribution.rb phew, fixed some issues with contribution saving in rails 3.2 2013-03-05 20:51:24 -06:00
contribution_observer.rb
donation.rb
donation_feature.rb
fragment_expiration.rb only send cache deletions for usable locales 2013-12-08 23:44:25 -06:00
fragment_localization.rb
image.rb
item.rb
item_observer.rb
item_outfit_relationship.rb
neopets_connection.rb store all neopets usernames for logged-in users, but breaks closet_hangers#index 2014-01-18 21:55:01 -06:00
neopets_page.rb
neopets_user.rb Use secret NEOPETS_URL_ORIGIN to bypass HTTPS 2022-08-02 20:46:47 -07:00
news_post.rb
outfit.rb
outfit_image_update.rb
outfit_image_uploader.rb
parent_swf_asset_relationship.rb give SWFs real, unique ID numbers 2012-01-12 17:17:59 -06:00
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 attempt to fix new species_support_ids format. sigh. 2013-01-23 00:25:09 -06:00
swf_asset.rb Oops, fix mall spider bug, added by our HTTPS fix 2022-08-23 03:04:54 -07:00
user.rb finally let people remove all items from the list at once. 2015-07-19 12:35:49 -04:00
user_sweeper.rb Cache trade info on items#show, finally! I think it's the performance culprit. 2013-12-27 14:49:46 -05:00
wardrobe_tip.rb
zone.rb