Skip to content

Commit

Permalink
#1375: add quick ref about XFF to IIS docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Badgerati committed Feb 11, 2025
1 parent ef89791 commit e0121b2
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions docs/Hosting/IIS.md
Original file line number Diff line number Diff line change
Expand Up @@ -509,6 +509,20 @@ This can be done using the following example:
})
```

## IIS Client IP

If you're using Pode's Access or Rate limiting rules, or you just need the Client IP address of the request, then it's worth noting that the Remote Address will always be `localhost` - as IIS forwards the request to Pode running behind-the-scenes.

You can get the originating client IP from the `X-Forwarded-For` header, which IIS does add to the request by default.

For example, if you want to block requests from a certain subnet:

```powershell
Add-PodeLimitAccessRule -Name 'Example' -Action Deny -Component @(
New-PodeLimitIPComponent -IP '10.0.1.0/16' -Location 'XForwardedFor'
)
```

## Azure Web Apps

To host your Pode server under IIS using Azure Web Apps, ensure the OS type is Windows and the framework is .NET Core 2.1/3.0.
Expand Down

0 comments on commit e0121b2

Please sign in to comment.