Skip to content

Commit

Permalink
Fix proxy issue with non-IAM connections (#166)
Browse files Browse the repository at this point in the history
* Fix proxy issue with non-IAM connections

* Update changelog and bump to 1.3.1
  • Loading branch information
michaelnchin authored Aug 15, 2023
1 parent 9c02e2d commit ca392c1
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 5 deletions.
7 changes: 7 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# graph-explorer Change Log

## Release 1.3.1

This patch release includes bugfixes for Release 1.3.0.

**Bug fixes**
- Fix proxy issue with non-IAM Neptune requests (https://github.com/aws/graph-explorer/pull/166)

## Release 1.3.0

This release includes the following feature enhancements and bug fixes:
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "graph-explorer",
"version": "1.3.0",
"version": "1.3.1",
"description": "Graph Explorer",
"packageManager": "[email protected]",
"engines": {
Expand Down
4 changes: 2 additions & 2 deletions packages/graph-explorer-proxy-server/node-server.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ const errorHandler = (error, request, response, next) => {
new Promise((resolve) => setTimeout(() => resolve(), ms));

const retryFetch = async (url, headers, retries = 1, retryDelay = 10000) => {
// remove the existing host headers, we want ensure that we are passing the DB endpoint hostname.
delete headers["host"];
if (headers["aws-neptune-region"]) {
data = await getIAMHeaders({
host: url.hostname,
Expand All @@ -80,8 +82,6 @@ const errorHandler = (error, request, response, next) => {
service: "neptune-db",
region: headers["aws-neptune-region"]
});
// remove the host header because it's not needed for IAM
delete headers["host"];
headers = { ...headers, ...data };
}
for (let i = 0; i < retries; i++) {
Expand Down
2 changes: 1 addition & 1 deletion packages/graph-explorer-proxy-server/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "graph-explorer-proxy-server",
"version": "1.3.0",
"version": "1.3.1",
"description": "Server to facilitate communication between the browser and the supported graph database.",
"main": "node-server.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion packages/graph-explorer/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "graph-explorer",
"version": "1.3.0",
"version": "1.3.1",
"description": "Graph Explorer",
"packageManager": "[email protected]",
"engines": {
Expand Down

0 comments on commit ca392c1

Please sign in to comment.