-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #69 from mlibrary/enable-proxy-specs
Enable proxy specs
- Loading branch information
Showing
7 changed files
with
39 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,21 @@ | ||
require_relative "delegated_mode" | ||
|
||
# TODO: Currently skipped pending figuring out how to put the data into the headers. | ||
RSpec.describe "A proxied application in delegated mode", :skip do | ||
RSpec.describe "A proxied application in delegated mode" do | ||
# These are apps external to the web server, configured for reverse proxy. | ||
# They should receive identity and the authorized collections in forwarded | ||
# headers. | ||
|
||
include_examples "delegated mode" do | ||
let(:url) { "/app/proxied" } | ||
let(:authorized_column) { "X-Authzd-Coll" } | ||
let(:public_column) { "X-Public-Coll" } | ||
let(:parsed_body) do | ||
response.body | ||
.split("\n") | ||
.map { |s| s.split(":", 2) } | ||
.to_h | ||
.transform_values(&:lstrip) | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters