MCPcopy
hub / github.com/pallets/werkzeug / access_route

Method access_route

src/werkzeug/sansio/request.py:180–190  ·  view source on GitHub ↗

If a forwarded header exists this is a list of all ip addresses from the client ip to the last proxy server.

(self)

Source from the content-addressed store, hash-verified

178
179 @cached_property
180 def access_route(self) -> list[str]:
181 """If a forwarded header exists this is a list of all ip addresses
182 from the client ip to the last proxy server.
183 """
184 if "X-Forwarded-For" in self.headers:
185 return self.list_storage_class(
186 parse_list_header(self.headers["X-Forwarded-For"])
187 )
188 elif self.remote_addr is not None:
189 return self.list_storage_class([self.remote_addr])
190 return self.list_storage_class()
191
192 @cached_property
193 def full_path(self) -> str:

Callers

nothing calls this directly

Calls 1

parse_list_headerFunction · 0.85

Tested by

no test coverage detected