Skip to content
This repository has been archived by the owner on Aug 21, 2019. It is now read-only.

[#151098169] Use HTTPS when communicating with usasearch #10

Merged
merged 1 commit into from
Dec 20, 2017

Conversation

nickmarden
Copy link
Contributor

No description provided.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling 7562f38 on nathan/usasearch_https into 82d732a on master.

@nickmarden
Copy link
Contributor Author

nickmarden commented Sep 15, 2017

Marking this as do-not-merge because it's currently not possible to request the /api/v2/agencies endpoint from search.usa.gov whether over HTTP or HTTPS.

HTTP requests redirect to HTTPS:

[nick@npv-23319-l ~]$ curl -s -v -H 'Host: search.usa.gov' 'http://search.usa.gov/api/v2/agencies/search?query=temporary' 2>&1 | grep Location
< Location: https://search.usa.gov/api/v2/agencies/search?query=temporary

and HTTPS requests redirect to HTTP:

[nick@npv-23319-l ~]$ curl -s -v -H 'Host: search.usa.gov' 'https://search.usa.gov/api/v2/agencies/search?query=temporary' 2>&1 | grep Location
< Location: http://search.usa.gov/api/v2/agencies/search?query=temporary

@nickmarden
Copy link
Contributor Author

It looks as though the root cause of the problem described above is the folllowing:

  • HTTP requests from the outside world to the /api/v2/agencies endpoint are being redirected to HTTPS because of Apache-level redirect rules in the search.usa.gov web site
  • HTTPS request from anywhere to the /api/v2/agencies endpoint are being redirected to HTTP because the search.usa.gov code base does not have ssl_allowed :all or something similar for the /api/v2/agencies endpoint.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling 82c7300 on nathan/usasearch_https into a1a61f9 on master.

@nickmarden nickmarden merged commit 3e4f463 into master Dec 20, 2017
@nickmarden nickmarden deleted the nathan/usasearch_https branch December 20, 2017 18:06
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants