[PR #51] [MERGED] feat: add a add_prefix middleware #151

Closed
opened 2025-12-29 09:23:40 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/yusing/godoxy/pull/51
Author: @polds
Created: 1/20/2025
Status: Merged
Merged: 1/23/2025
Merged by: @yusing

Base: v0.8Head: feat/path-rewrite


📝 Commits (1)

  • 01c1e48 feat: add a add_prefix middleware

📊 Changes

2 files changed (+60 additions, -1 deletions)

View changed files

📝 internal/net/http/middleware/modify_request.go (+13 -1)
📝 internal/net/http/middleware/modify_request_test.go (+47 -0)

📄 Description

This will allow you to translate:

foo.mydomain.com => 192.168.1.99:8000/foo (for example)

Use:

proxy.*.middlewares.request.add_prefix: "/foo"

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/yusing/godoxy/pull/51 **Author:** [@polds](https://github.com/polds) **Created:** 1/20/2025 **Status:** ✅ Merged **Merged:** 1/23/2025 **Merged by:** [@yusing](https://github.com/yusing) **Base:** `v0.8` ← **Head:** `feat/path-rewrite` --- ### 📝 Commits (1) - [`01c1e48`](https://github.com/yusing/godoxy/commit/01c1e48242b5afbf9cabe2f7870b83d3fe388661) feat: add a `add_prefix` middleware ### 📊 Changes **2 files changed** (+60 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `internal/net/http/middleware/modify_request.go` (+13 -1) 📝 `internal/net/http/middleware/modify_request_test.go` (+47 -0) </details> ### 📄 Description This will allow you to translate: `foo.mydomain.com` => `192.168.1.99:8000/foo` (for example) Use: ```yaml proxy.*.middlewares.request.add_prefix: "/foo" ``` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-29 09:23:40 +01:00
adam closed this issue 2025-12-29 09:23:40 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/godoxy#151