diff --git a/.github/actions/deploy-proxy/action.yml b/.github/actions/deploy-proxy/action.yml index 9ba197d..978b5d3 100644 --- a/.github/actions/deploy-proxy/action.yml +++ b/.github/actions/deploy-proxy/action.yml @@ -12,7 +12,7 @@ inputs: default: https://github.com/GSA-TTS/cg-egress-proxy.git proxy_version: description: git ref to be deployed - default: update-caddy + default: main runs: using: composite steps: diff --git a/app/models/document.rb b/app/models/document.rb index 8e9cf50..50cac18 100644 --- a/app/models/document.rb +++ b/app/models/document.rb @@ -4,9 +4,7 @@ class Document < ApplicationRecord validate :url_is_https def contents - @contents = Faraday.new(url) do |conn| - conn.adapter :typhoeus - end.get.body + @contents ||= Faraday.get(url).body end private diff --git a/config/initializers/faraday.rb b/config/initializers/faraday.rb new file mode 100644 index 0000000..2dfdc43 --- /dev/null +++ b/config/initializers/faraday.rb @@ -0,0 +1 @@ +Faraday.default_adapter = :typhoeus