et_gds_design_system 5.0.1 → 5.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a0037512b1382e65b771cb3d2eb890d9c479bad7a82f8f6f8a5846cef9f16b14
4
- data.tar.gz: 3c7ef97f2c1407e9352d483df1027870b33c293ef0c392defcdb4e5bcf1d37dc
3
+ metadata.gz: dbc8799c7ee39d4789978e1364102f7b4d43be7b1855eff08d59ad1af431eb18
4
+ data.tar.gz: 4cbcfc5505278342807a4761cfc6fed8deb58b3d7aa388bd690adacf1ec8783c
5
5
  SHA512:
6
- metadata.gz: a32e92ac55bb57b505b73bffd4dcde7db41736548dc4973591be473f8c482a0566a034e9e9413d4f38847b4db32faf92ecd060391dcd1a574484c88c325377a6
7
- data.tar.gz: 82d51658be8fc7b560b8dc8584ecc4462ffb00a7e71ac4f2456a54c921d2a727dfcedf216d843f80ceb6a08b20c895aeb3bb0daefb60176d168a153722730470
6
+ metadata.gz: 9b21525a53691c065fdad9f4f1a04f5b78ee263e42f3aeddd03a24b05ca55e541f73b2ae05a663d9609a6087ea897e7f80d71b3bbce496a0cd5301a31a23464f
7
+ data.tar.gz: 32a4b05ebb827cb9273d070310ced1492e4783de9edbfd4b459df23f90c3527feeaaa860e0e7c1d67b4128961e50bc8d479711ae5046b09fe6494ecc957a9b54
@@ -3,21 +3,17 @@ require 'rack-proxy'
3
3
  module EtGdsDesignSystem
4
4
  class ApiProxy < Rack::Proxy
5
5
  def rewrite_env(env)
6
- env.merge 'REQUEST_URI' => correct_host(env['REQUEST_URI']),
6
+ env.merge 'REQUEST_URI' => modified_url_for(env),
7
7
  'HTTP_HOST' => "#{et_api_uri.host}:#{et_api_uri.port}",
8
8
  'PATH_INFO' => ''
9
9
  end
10
10
 
11
11
  private
12
12
 
13
- def correct_host(url)
14
- uri = URI.parse(url)
15
- uri.scheme = et_api_uri.scheme
16
- uri.host = et_api_uri.host
17
- uri.port = et_api_uri.port
13
+ def modified_url_for(env)
14
+ uri = et_api_uri.clone
15
+ uri.path = env['REQUEST_PATH']
18
16
  uri.to_s
19
- rescue URI::InvalidURIError
20
- raise "Invalid URL - '#{url}'"
21
17
  end
22
18
 
23
19
  def et_api_uri
@@ -1,3 +1,3 @@
1
1
  module EtGdsDesignSystem
2
- VERSION = '5.0.1'
2
+ VERSION = '5.0.2'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: et_gds_design_system
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.0.1
4
+ version: 5.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gary Taylor