Latest Socket ResearchMalicious Chrome Extension Performs Hidden Affiliate Hijacking.Details
Socket
Book a DemoInstallSign in
Socket

trpc.group/trpc-go/trpc-filter/referer

Package Overview
Dependencies
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

trpc.group/trpc-go/trpc-filter/referer

Go Modules
Version
v1.0.0
Version published
Created
Source

referer

http referer 安全验证

使用说明

  • 增加 import
import (
     _ "trpc.group/trpc-go/trpc-filter/referer"
)
server:
 ...
 filter:
  ...
  - referer
plugins:
  auth:
    referer:
      apply_to_all_path:
        - qq.com
      path1:
        - qq.com
      path2:
        - NULL

配置说明

  • apply_to_all_path 默认规则
  • NULL 表示 referer 为空时可以放过
  • * 匹配所有的(不安全)
  • referer 插件 会对所有 url 验证 非白名单模式

FAQs

Package last updated on 16 Oct 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts