diff --git a/associated-press/app/client/HttpClient.scala b/associated-press/app/client/HttpClient.scala index 19b3733..b6d7a8f 100644 --- a/associated-press/app/client/HttpClient.scala +++ b/associated-press/app/client/HttpClient.scala @@ -16,7 +16,11 @@ object HttpClient { headers: Seq[(String, String)] = Seq.empty, parameters: Seq[(String, String)] = Seq.empty ): Future[StandaloneWSResponse] = { - ws.url(uri) + // on the CODE env, the preview feed will return HTTP S3 URLs, but our + // security group only allows outbound requests on port 443... + // force all the URIs to HTTPS to allow the requests to complete. + val forcedHttps = uri.replaceAll("^http://", "https://") + ws.url(forcedHttps) .addHttpHeaders(headers: _*) .addQueryStringParameters(parameters: _*) .get()