This repository has been archived by the owner on May 7, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 12
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 #75 from hkeeler/inst-search-proxy
Refactor for hmda-platform Institution Search
- Loading branch information
Showing
17 changed files
with
133 additions
and
310 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
35 changes: 35 additions & 0 deletions
35
auth-proxy/conf/etc/httpd/conf.d/02-institution-search.conf
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 |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# Institution Search Reverse Proxy | ||
<VirtualHost *:9443> | ||
|
||
# Enable HTTPS with default Apache cert | ||
SSLEngine On | ||
SSLCertificateFile /etc/pki/tls/certs/localhost.crt | ||
SSLCertificateKeyFile /etc/pki/tls/private/localhost.key | ||
|
||
# Route all traffic CORS and ProxyPass | ||
<Location "/"> | ||
|
||
# CORS Preflight | ||
# SEE: https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS#Preflighted_requests | ||
<If "%{REQUEST_METHOD} == 'OPTIONS' && %{HTTP:Origin} != '' && %{HTTP:Access-Control-Request-Headers} != '' && %{HTTP:Access-Control-Request-Method} != ''"> | ||
LogMessage "CORS Preflight - Origin: %{req:Origin}; Headers: %{req:Access-Control-Request-Headers}; Methods: %{req:Access-Control-Request-Method}" | ||
|
||
Header always set Access-Control-Allow-Origin "*" | ||
Header always set Access-Control-Allow-Methods: "GET, POST, PUT, PATCH, DELETE, OPTIONS, HEAD" | ||
Header always set Access-Control-Allow-Headers: "Authorization, Cache-Control, Accept, Content-Type" | ||
Header always set Access-Control-Max-Age "600" | ||
|
||
RewriteEngine On | ||
RewriteRule ^(.*)$ $1 [R=204,L] | ||
</If> | ||
<ElseIf "%{HTTP:Origin} != ''"> | ||
LogMessage "CORS Request - Origin: %{req:Origin}" | ||
|
||
Header always set Access-Control-Allow-Origin "*" | ||
</ElseIf> | ||
|
||
ProxyPass ${PUBLIC_API_UPSTREAM_URI} | ||
ProxyPassReverse ${PUBLIC_API_UPSTREAM_URI} | ||
</Location> | ||
|
||
</VirtualHost> |
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.