Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strip non-address characters from Forwarded for= #3343

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Apr 26, 2024

  1. Strip non-address characters from Forwarded for=

    This is something of a followup to actix#2528, which asked for port information to not be included in  when it was taken from the local socket.
    
    The  header's  element may optionally contain port information (https://datatracker.ietf.org/doc/html/rfc7239#section-6).
    However, as I understand it,  is *supposed* to only contain an IP address, without port (per actix#2528).
    
    This PR corrects that discrepancy, making it easier to parse the result of this method in application code.
    
    There should not be any compatibility concerns, as anyone parsing the output of  would already need to handle both port and portless cases anyway.
    mpalmer committed Apr 26, 2024
    Configuration menu
    Copy the full SHA
    4d3d6f8 View commit details
    Browse the repository at this point in the history