H3 中文文档 logoH3 中文文档
  • Guide
  • Utils
  • Examples
  • Migration
  • Blog
  • Guide
  • Utils
  • Examples
  • Migration
  • H3 工具集
  • 请求
  • 响应
  • Cookie
  • 安全
  • 代理
  • 更多工具
  • 社区

代理

H3 代理工具。

fetchWithEvent(event, req, init?, options?: { fetch: F })

使用事件的上下文和请求头发起 fetch 请求。

getProxyRequestHeaders(event)

获取请求头对象,但不包含已知会在代理时导致问题的头部。

proxy(event, target, opts)

向目标 URL 发起代理请求,并将响应返回给客户端。

proxyRequest(event, target, opts)

将传入请求代理到目标 URL。

  • Edit this page

安全

H3 安全工具。

更多工具

更多 H3 实用工具。

On this page

  • fetchWithEvent(event, req, init?, options?: { fetch: F })
  • getProxyRequestHeaders(event)
  • proxy(event, target, opts)
  • proxyRequest(event, target, opts)

H3 中文文档  通用、小巧且快速的服务器 · Generated with UnDocs and Nuxt UI Pro .