Skip to content

Instantly share code, notes, and snippets.

@albertoperdomo
Created October 8, 2014 15:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save albertoperdomo/6f3d7ffcb1351e5c61ce to your computer and use it in GitHub Desktop.
Save albertoperdomo/6f3d7ffcb1351e5c61ce to your computer and use it in GitHub Desktop.
Issue with node URLs in transaction endpoint when using X-Forwarded-Host and X-Forwarded-Proto
$ curl -s localhost:7474/db/data/transaction \
-H 'X-Forwarded-Host: db-foo.graphenedb.com:80'
-H 'X-Forwarded-Proto: https'
-H 'Host: db-foo.graphenedb.com'
-H 'Content-Type: application/json'
-d '{"statements":[{"statement":"MATCH n RETURN n","parameters":{},"resultDataContents":["REST"]}]}' | jq .
{
"commit": "https://db-foo.graphenedb.com:80/db/data/transaction/4/commit",
"results": [
{
"columns": [
"n"
],
"data": [
{
"rest": [
{
"outgoing_relationships": "http://localhost:7474/db/data/node/0/relationships/out",
"labels": "http://localhost:7474/db/data/node/0/labels",
"all_typed_relationships": "http://localhost:7474/db/data/node/0/relationships/all/{-list|&|types}",
"traverse": "http://localhost:7474/db/data/node/0/traverse/{returnType}",
"property": "http://localhost:7474/db/data/node/0/properties/{key}",
"self": "http://localhost:7474/db/data/node/0",
"outgoing_typed_relationships": "http://localhost:7474/db/data/node/0/relationships/out/{-list|&|types}",
"properties": "http://localhost:7474/db/data/node/0/properties",
"incoming_relationships": "http://localhost:7474/db/data/node/0/relationships/in",
"create_relationship": "http://localhost:7474/db/data/node/0/relationships",
"paged_traverse": "http://localhost:7474/db/data/node/0/paged/traverse/{returnType}{?pageSize,leaseTime}",
"all_relationships": "http://localhost:7474/db/data/node/0/relationships/all",
"incoming_typed_relationships": "http://localhost:7474/db/data/node/0/relationships/in/{-list|&|types}",
"metadata": {
"id": 0,
"labels": []
},
"data": {}
}
]
}
]
}
],
"transaction": {
"expires": "Wed, 08 Oct 2014 15:07:14 +0000"
},
"errors": []
}
@jimwebber
Copy link

I'll take a look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment