xff

package module
v0.1.1-0...-f455540 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 10, 2023 License: MIT Imports: 6 Imported by: 0

README

xff

X-Forwarded-For middleware fo go-Kratos

refrence

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Server

func Server(opts ...Option) middleware.Middleware

Types

type Option

type Option func(*xffOption)

func AllowAll

func AllowAll() Option

AllowAll Set to true if all IPs or Subnets are allowed.

func AllowedSubnets

func AllowedSubnets(subnets []string) Option

AllowedSubnets is a list of Subnets from which we will accept the X-Forwarded-For header. If this list is empty we will accept every Subnets (default).

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL