-
Notifications
You must be signed in to change notification settings - Fork 108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Convert http references to https #3998
Changes from 2 commits
6e49488
f1a6529
fc47653
6f01018
225af8f
c0a629d
cbf42f6
707ab79
816f474
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -114,7 +114,7 @@ | |
"note": "", | ||
"updated": "2017-10-10", | ||
"name": "download_files", | ||
"json_value": "{\"2017-03\":{\"percent_30_60\":{\"County\":{\"url\":\"http://files.consumerfinance.gov.s3.amazonaws.com/data/mortgage-performance/downloads/CountyMortgagesPercent-30-89DaysLate-thru-2017-03.csv\",\"slug\":\"CountyMortgagesPercent-30-89DaysLate-thru-2017-03\",\"size\":\"40 KB\"},\"MetroArea\":{\"url\":\"http://files.consumerfinance.gov.s3.amazonaws.com/data/mortgage-performance/downloads/MetroAreaMortgagesPercent-30-89DaysLate-thru-2017-03.csv\",\"slug\":\"MetroAreaMortgagesPercent-30-89DaysLate-thru-2017-03\",\"size\":\"148 KB\"},\"State\":{\"url\":\"http://files.consumerfinance.gov.s3.amazonaws.com/data/mortgage-performance/downloads/StateMortgagesPercent-30-89DaysLate-thru-2017-03.csv\",\"slug\":\"StateMortgagesPercent-30-89DaysLate-thru-2017-03\",\"size\":\"25 KB\"}},\"thru_month\":\"March 2017\",\"percent_90\":{\"County\":{\"url\":\"http://files.consumerfinance.gov.s3.amazonaws.com/data/mortgage-performance/downloads/CountyMortgagesPercent-90-plusDaysLate-thru-2017-03.csv\",\"slug\":\"CountyMortgagesPercent-90-plusDaysLate-thru-2017-03\",\"size\":\"40 KB\"},\"MetroArea\":{\"url\":\"http://files.consumerfinance.gov.s3.amazonaws.com/data/mortgage-performance/downloads/MetroAreaMortgagesPercent-90-plusDaysLate-thru-2017-03.csv\",\"slug\":\"MetroAreaMortgagesPercent-90-plusDaysLate-thru-2017-03\",\"size\":\"148 KB\"},\"State\":{\"url\":\"http://files.consumerfinance.gov.s3.amazonaws.com/data/mortgage-performance/downloads/StateMortgagesPercent-90-plusDaysLate-thru-2017-03.csv\",\"slug\":\"StateMortgagesPercent-90-plusDaysLate-thru-2017-03\",\"size\":\"25 KB\"}},\"pub_date\":\"October 2017\"}}" | ||
"json_value": "{\"2017-03\":{\"percent_30_60\":{\"County\":{\"url\":\"https://files.consumerfinance.gov.s3.amazonaws.com/data/mortgage-performance/downloads/CountyMortgagesPercent-30-89DaysLate-thru-2017-03.csv\",\"slug\":\"CountyMortgagesPercent-30-89DaysLate-thru-2017-03\",\"size\":\"40 KB\"},\"MetroArea\":{\"url\":\"https://files.consumerfinance.gov.s3.amazonaws.com/data/mortgage-performance/downloads/MetroAreaMortgagesPercent-30-89DaysLate-thru-2017-03.csv\",\"slug\":\"MetroAreaMortgagesPercent-30-89DaysLate-thru-2017-03\",\"size\":\"148 KB\"},\"State\":{\"url\":\"https://files.consumerfinance.gov.s3.amazonaws.com/data/mortgage-performance/downloads/StateMortgagesPercent-30-89DaysLate-thru-2017-03.csv\",\"slug\":\"StateMortgagesPercent-30-89DaysLate-thru-2017-03\",\"size\":\"25 KB\"}},\"thru_month\":\"March 2017\",\"percent_90\":{\"County\":{\"url\":\"https://files.consumerfinance.gov.s3.amazonaws.com/data/mortgage-performance/downloads/CountyMortgagesPercent-90-plusDaysLate-thru-2017-03.csv\",\"slug\":\"CountyMortgagesPercent-90-plusDaysLate-thru-2017-03\",\"size\":\"40 KB\"},\"MetroArea\":{\"url\":\"https://files.consumerfinance.gov.s3.amazonaws.com/data/mortgage-performance/downloads/MetroAreaMortgagesPercent-90-plusDaysLate-thru-2017-03.csv\",\"slug\":\"MetroAreaMortgagesPercent-90-plusDaysLate-thru-2017-03\",\"size\":\"148 KB\"},\"State\":{\"url\":\"https://files.consumerfinance.gov.s3.amazonaws.com/data/mortgage-performance/downloads/StateMortgagesPercent-90-plusDaysLate-thru-2017-03.csv\",\"slug\":\"StateMortgagesPercent-90-plusDaysLate-thru-2017-03\",\"size\":\"25 KB\"}},\"pub_date\":\"October 2017\"}}" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. URLs like http://files.consumerfinance.gov.s3.amazonaws.com/foo need to become just https://files.consumerfinance.gov/foo There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed in 6f01018 |
||
}, | ||
"model": "data_research.mortgagemetadata", | ||
"pk": 22 | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,7 +18,7 @@ | |
S3_SECRET = os.getenv('AWS_S3_SECRET_ACCESS_KEY') | ||
BASE_BUCKET = settings.AWS_STORAGE_BUCKET_NAME | ||
MORTGAGE_SUB_BUCKET = "data/mortgage-performance" | ||
PUBLIC_ACCESS_BASE = 'http://{}.s3.amazonaws.com/{}'.format( | ||
PUBLIC_ACCESS_BASE = 'https://{}.s3.amazonaws.com/{}'.format( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. See above; the HTTPS format for S3 would be something like 'https://{}/{}'.format(BASE_BUCKET, MORTGAGE_SUB_BUCKET) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is as you have written okay, or does it need testing to verify? Fixed in 6f01018 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We could add a new test but it'd just be testing that strings are appended correctly. I tested this manually on your branch: $ convert_http_to_https* $ ALLOWED_HOSTS='["*"]' DJANGO_SETTINGS_MODULE=cfgov.settings.production cfgov/manage.py shell
>>> from data_research.mortgage_utilities.s3_utils import *
>>> PUBLIC_ACCESS_BASE, S3_SOURCE_BUCKET
(u'https://files.consumerfinance.gov/data/mortgage-performance', u'https://files.consumerfinance.gov/data/mortgage-performance/source') This looks correct to me. |
||
BASE_BUCKET, MORTGAGE_SUB_BUCKET) | ||
S3_MORTGAGE_DOWNLOADS_BASE = '{}/downloads'.format(PUBLIC_ACCESS_BASE) | ||
S3_SOURCE_BUCKET = '{}/source'.format(PUBLIC_ACCESS_BASE) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -117,7 +117,7 @@ def export_downloadable_csv(geo_type, late_value): | |
Each CSV is to start with a National row for comparison. | ||
|
||
CSVs are posted at | ||
http://files.consumerfinance.gov.s3.amazonaws.com/data/mortgage-performance/downloads/ # noqa: E501 | ||
https://files.consumerfinance.gov.s3.amazonaws.com/data/mortgage-performance/downloads/ # noqa: E501 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. See above; remove s3.amazonaws.com. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed in 6f01018 |
||
|
||
The script also stores URLs and file sizes for use in page footnotes. | ||
""" | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
<a href="http://www.facebook.com/sharer.php?u={{ request.url }}{% if utm_campaign %}%3Futm_campaign={{ utm_campaign }}{% endif %}" class="share-facebook"><img src="{{ static('nemo/_/img/icon-facebook-retina.png') }}" alt="Share on Facebook" class="icon-20"></a> | ||
<a href="http://twitter.com/share?url={{ request.url|urlencode }}{% if utm_campaign %}%3Futm_campaign={{ utm_campaign }}{% endif %}&text={{ tweet_text if tweet_text else 'CFPB - Obtener Respuestas' }}&via=CFPB&lang=es" class="share-twitter"><img src="{{ static('nemo/_/img/icon-twitter-retina.png') }}" alt="Share on Twitter" class="icon-20"></a> | ||
<a href="http://api.addthis.com/oexchange/0.8/forward/email/offer?url={{ request.url|urlencode }}{% if utm_campaign %}%3Futm_campaign={{ utm_campaign }}{% endif %}&title={{ page.question if page.question else 'CFPB - Obtener Respuestas' }}&pubid=ra-4da354ee346886d2" class="share-email addthis_button_email"><img src="{{ static('nemo/_/img/icon-email-retina.png') }}" alt="Share via email" class="icon-20"></a> | ||
<a href="https://www.facebook.com/sharer.php?u={{ request.url }}{% if utm_campaign %}%3Futm_campaign={{ utm_campaign }}{% endif %}" class="share-facebook"><img src="{{ static('nemo/_/img/icon-facebook-retina.png') }}" alt="Share on Facebook" class="icon-20"></a> | ||
<a href="https://twitter.com/share?url={{ request.url|urlencode }}{% if utm_campaign %}%3Futm_campaign={{ utm_campaign }}{% endif %}&text={{ tweet_text if tweet_text else 'CFPB - Obtener Respuestas' }}&via=CFPB&lang=es" class="share-twitter"><img src="{{ static('nemo/_/img/icon-twitter-retina.png') }}" alt="Share on Twitter" class="icon-20"></a> | ||
<a href="https://api.addthis.com/oexchange/0.8/forward/email/offer?url={{ request.url|urlencode }}{% if utm_campaign %}%3Futm_campaign={{ utm_campaign }}{% endif %}&title={{ page.question if page.question else 'CFPB - Obtener Respuestas' }}&pubid=ra-4da354ee346886d2" class="share-email addthis_button_email"><img src="{{ static('nemo/_/img/icon-email-retina.png') }}" alt="Share via email" class="icon-20"></a> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
<a href="http://www.facebook.com/sharer.php?u={{ request.url }}{% if utm_campaign %}%3Futm_campaign={{ utm_campaign }}{% endif %}" class="share-facebook"><img src="{{ static('nemo/_/img/icon-facebook-retina.png') }}" alt="Share on Facebook" class="icon-20"></a> | ||
<a href="http://twitter.com/share?url={{ request.url|urlencode }}{% if utm_campaign %}%3Futm_campaign={{ utm_campaign }}{% endif %}&text={{ tweet_text if tweet_text else 'CFPB - Obtener Respuestas' }}&via=CFPB&lang=es" class="share-twitter"><img src="{{ static('nemo/_/img/icon-twitter-retina.png') }}" alt="Share on Twitter" class="icon-20"></a> | ||
<a href="http://api.addthis.com/oexchange/0.8/forward/email/offer?url={{ request.url|urlencode }}{% if utm_campaign %}%3Futm_campaign={{ utm_campaign }}{% endif %}&title={{ page.question if page.question else 'CFPB - Obtener Respuestas' }}&pubid=ra-4da354ee346886d2" class="share-email addthis_button_email"><img src="{{ static('nemo/_/img/icon-email-retina.png') }}" alt="Share via email" class="icon-20"></a> | ||
<a href="https://www.facebook.com/sharer.php?u={{ request.url }}{% if utm_campaign %}%3Futm_campaign={{ utm_campaign }}{% endif %}" class="share-facebook"><img src="{{ static('nemo/_/img/icon-facebook-retina.png') }}" alt="Share on Facebook" class="icon-20"></a> | ||
<a href="https://twitter.com/share?url={{ request.url|urlencode }}{% if utm_campaign %}%3Futm_campaign={{ utm_campaign }}{% endif %}&text={{ tweet_text if tweet_text else 'CFPB - Obtener Respuestas' }}&via=CFPB&lang=es" class="share-twitter"><img src="{{ static('nemo/_/img/icon-twitter-retina.png') }}" alt="Share on Twitter" class="icon-20"></a> | ||
<a href="https://api.addthis.com/oexchange/0.8/forward/email/offer?url={{ request.url|urlencode }}{% if utm_campaign %}%3Futm_campaign={{ utm_campaign }}{% endif %}&title={{ page.question if page.question else 'CFPB - Obtener Respuestas' }}&pubid=ra-4da354ee346886d2" class="share-email addthis_button_email"><img src="{{ static('nemo/_/img/icon-email-retina.png') }}" alt="Share via email" class="icon-20"></a> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you're cleaning up this reference to Slick (which I guess is no longer used), can we also remove this one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!