Skip to content

Commit

Permalink
Alter host allow logic in rest api
Browse files Browse the repository at this point in the history
it appears that at least in currently documented behaviour that we were filtering on server address not client address, which made it hard to reason about.

fixes Consensys#8567

Signed-off-by: Paul Harris <paul.harris@consensys.net>
  • Loading branch information
rolfyone committed Sep 6, 2024
1 parent 2c60a8f commit a9a0195
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@
- Implemented [PostAggregateAndProofsV2](https://ethereum.github.io/beacon-APIs/?urls.primaryName=dev#/Validator/publishAggregateAndProofsV2) (adding support for Electra)

### Bug Fixes
- Updated allow-hosts logic to fix an issue with filtering (#8567).
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public HostAllowlistHandler(final List<String> hostAllowlist) {

@Override
public void handle(final Context ctx) throws Exception {
String header = ctx.host();
String header = ctx.ip();
if (!isHostAuthorized(hostAllowlist, header)) {
LOG.debug("Host not authorized " + header);
throw new ForbiddenResponse("Host not authorized");
Expand Down

0 comments on commit a9a0195

Please sign in to comment.