a6-plugin-proxy-rewrite

Configure the APISIX proxy-rewrite plugin to modify request URIs, headers, methods, and schemes.

1|2|Updated Mar 6, 2026
One-click install
npx skills add https://github.com/moonming/a6 --skill a6-plugin-proxy-rewrite
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: a6-plugin-proxy-rewrite
Source: https://github.com/moonming/a6/tree/main/skills/a6-plugin-proxy-rewrite
Command: npx skills add https://github.com/moonming/a6 --skill a6-plugin-proxy-rewrite

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill simplifies the process of modifying incoming request attributes like URI, host, method, and headers before they are forwarded to your backend services, enabling flexible traffic management and backend integration.

Core Features & Use Cases

  • URI Rewriting: Dynamically change request paths, including prefix stripping and complex regex transformations.
  • Header Manipulation: Add, set, or remove request headers to control backend behavior or pass information.
  • Method & Scheme Changes: Alter the HTTP method or scheme for compatibility with backend services.
  • Use Case: You need to route traffic from /api/v1/* to a backend service that expects /v2/*, while also adding a custom X-API-Version: v2 header.

Quick Start

Configure the proxy-rewrite plugin on a new route to strip the '/api/v1' prefix and rewrite the URI to '/users'.

Frequently Asked Questions about a6-plugin-proxy-rewrite

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I rewrite request URIs in APISIX before forwarding to upstream services?

To rewrite request URIs in APISIX, configure the proxy-rewrite plugin on your routes to dynamically modify paths using prefix stripping or complex regex transformations before forwarding traffic upstream.

Can I add or remove HTTP request headers dynamically in APISIX?

Yes, you can manipulate HTTP request headers in APISIX by setting the proxy-rewrite plugin to add, set, or remove headers, enabling you to control backend behavior or pass custom information securely.

What is the best way to change the HTTP method and scheme for APISIX routes?

The best way to change HTTP methods and schemes for APISIX routes is by applying the proxy-rewrite plugin, which alters these request attributes dynamically to ensure compatibility with backend services.

How do I strip an API prefix and add a custom header in APISIX at the same time?

To strip an API prefix and add a custom header simultaneously in APISIX, configure the proxy-rewrite plugin on a single route to perform URI regex rewriting and header addition before forwarding.

Does APISIX proxy-rewrite support modifying the host header for backend integration?

Yes, APISIX proxy-rewrite supports modifying the host header, allowing you to dynamically alter request attributes for flexible traffic management and seamless backend service integration.

When do I need request modification in APISIX gateway traffic routing?

You need request modification in APISIX when routing traffic to backends expecting different paths, schemes, or headers, enabling dynamic request transformation to bridge interface mismatches.