MCPcopy Create free account
hub / github.com/AstroPrint/AstroBox / getRemoteAddress

Function getRemoteAddress

src/octoprint/util/__init__.py:116–120  ·  view source on GitHub ↗
(request)

Source from the content-addressed store, hash-verified

114
115
116def getRemoteAddress(request):
117 forwardedFor = request.headers.get("X-Forwarded-For", None)
118 if forwardedFor is not None:
119 return forwardedFor.split(",")[0]
120 return request.remote_addr
121
122
123def getDosFilename(input, existingFilenames, extension=None):

Callers

nothing calls this directly

Calls 1

getMethod · 0.45

Tested by

no test coverage detected