Documentation ¶
Index ¶
Constants ¶
View Source
const ( // XForwardedSSL is a non-standard X-Forwarded-* header that is set to "on" or "off" depending on // whether SSL is enabled. XForwardedSSL = "X-Forwarded-Ssl" )
Variables ¶
View Source
var ReservedHeaders = append([]string{teleport.AppJWTHeader, teleport.AppCFHeader, XForwardedSSL, }, forward.XHeaders..., )
ReservedHeaders is a list of headers injected by Teleport.
Functions ¶
func IsReservedHeader ¶
IsReservedHeader returns true if the provided header is one of headers injected by Teleport.
func WithSessionContext ¶
func WithSessionContext(r *http.Request, sessionCtx *SessionContext) *http.Request
WithSessionContext adds session context to provided request.
Types ¶
type HeaderRewriter ¶
type HeaderRewriter struct {
// contains filtered or unexported fields
}
HeaderRewriter delegates to oxy's rewriter and then appends its own headers.
func NewHeaderRewriter ¶
func NewHeaderRewriter(delegates ...forward.ReqRewriter) *HeaderRewriter
NewHeaderRewriter will create a new header rewriter with a number of delegates. The delegates will be executed in the order supplied
func (*HeaderRewriter) Rewrite ¶
func (hr *HeaderRewriter) Rewrite(req *http.Request)
Rewrite will delegate to the supplied delegates' rewrite functions and then inject its own headers.
type SessionContext ¶
type SessionContext struct { // Identity is the requested identity. Identity *tlsca.Identity // App is the requested identity. App types.Application // Emitter is the audit log emitter. Emitter events.Emitter }
SessionContext contains common context parameters for an App session.
func GetSessionContext ¶
func GetSessionContext(r *http.Request) (*SessionContext, error)
GetSessionContext retrieves the session context from a request.
Click to show internal directories.
Click to hide internal directories.