Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.5.1] - 2026-02-20
### Changed
- Increased default maximum request body size to 16MB

## [0.5.0] - 2026-02-11

### Added
Expand Down Expand Up @@ -78,6 +82,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added
- Initial release

[0.5.1]: https://github.com/gooddata/gooddata-goodmock/compare/v0.5.0...v0.5.1
[0.5.0]: https://github.com/gooddata/gooddata-goodmock/compare/v0.4.0...v0.5.0
[0.4.0]: https://github.com/gooddata/gooddata-goodmock/compare/v0.3.2...v0.4.0
[0.3.2]: https://github.com/gooddata/gooddata-goodmock/compare/v0.3.1...v0.3.2
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.5.0
0.5.1
15 changes: 12 additions & 3 deletions internal/pureproxy/pureproxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ func forwardAndRespond(ps *ProxyServer, ctx *fasthttp.RequestCtx) {

func RunProxy() {
port := common.GetPort()
const maxRequestBodySize = 16 * 1024 * 1024

upstream := os.Getenv("PROXY_HOST")
if upstream == "" {
Expand All @@ -113,10 +114,18 @@ func RunProxy() {
fmt.Printf("| Port: %-69d|\n", port)
fmt.Printf("| Upstream: %-66s|\n", upstream)
fmt.Printf("| Verbose: %-66v|\n", verbose)
fmt.Printf("| Max Request Body: %-57s|\n", fmt.Sprintf("%d bytes", maxRequestBodySize))
fmt.Println("| |")
fmt.Println("└──────────────────────────────────────────────────────────────────────────────┘")

log.Fatal(fasthttp.ListenAndServe(addr, func(ctx *fasthttp.RequestCtx) {
handleProxyRequest(ps, ctx)
}))
httpServer := &fasthttp.Server{
Handler: func(ctx *fasthttp.RequestCtx) { handleProxyRequest(ps, ctx) },
MaxRequestBodySize: maxRequestBodySize,
ErrorHandler: func(ctx *fasthttp.RequestCtx, err error) {
ctx.SetStatusCode(fasthttp.StatusBadRequest)
ctx.SetBodyString(err.Error())
},
}

log.Fatal(httpServer.ListenAndServe(addr))
}
15 changes: 12 additions & 3 deletions internal/record/record.go
Original file line number Diff line number Diff line change
Expand Up @@ -610,6 +610,7 @@ func compileURLMatcher(pattern string) func(string) bool {

func RunRecord() {
port := common.GetPort()
const maxRequestBodySize = 16 * 1024 * 1024

upstream := os.Getenv("PROXY_HOST")
if upstream == "" {
Expand Down Expand Up @@ -637,10 +638,18 @@ func RunRecord() {
fmt.Printf("| Port: %-69d|\n", port)
fmt.Printf("| Upstream: %-66s|\n", upstream)
fmt.Printf("| Verbose: %-66v|\n", verbose)
fmt.Printf("| Max Request Body: %-57s|\n", fmt.Sprintf("%d bytes", maxRequestBodySize))
fmt.Println("| |")
fmt.Println("└──────────────────────────────────────────────────────────────────────────────┘")

log.Fatal(fasthttp.ListenAndServe(addr, func(ctx *fasthttp.RequestCtx) {
handleRecordRequest(rs, ctx)
}))
httpServer := &fasthttp.Server{
Handler: func(ctx *fasthttp.RequestCtx) { handleRecordRequest(rs, ctx) },
MaxRequestBodySize: maxRequestBodySize,
ErrorHandler: func(ctx *fasthttp.RequestCtx, err error) {
ctx.SetStatusCode(fasthttp.StatusBadRequest)
ctx.SetBodyString(err.Error())
},
}

log.Fatal(httpServer.ListenAndServe(addr))
}
15 changes: 12 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ func main() {

func runReplay() {
port := common.GetPort()
const maxRequestBodySize = 16 * 1024 * 1024

proxyHost := os.Getenv("PROXY_HOST")
if proxyHost == "" {
Expand Down Expand Up @@ -90,10 +91,18 @@ func runReplay() {
fmt.Printf("| Mode: %-69s|\n", "replay")
fmt.Printf("| Port: %-69d|\n", port)
fmt.Printf("| Verbose: %-66v|\n", verbose)
fmt.Printf("| Max Request Body: %-57s|\n", fmt.Sprintf("%d bytes", maxRequestBodySize))
fmt.Println("| |")
fmt.Println("└──────────────────────────────────────────────────────────────────────────────┘")

log.Fatal(fasthttp.ListenAndServe(addr, func(ctx *fasthttp.RequestCtx) {
server.HandleRequest(s, ctx)
}))
httpServer := &fasthttp.Server{
Handler: func(ctx *fasthttp.RequestCtx) { server.HandleRequest(s, ctx) },
MaxRequestBodySize: maxRequestBodySize,
ErrorHandler: func(ctx *fasthttp.RequestCtx, err error) {
ctx.SetStatusCode(fasthttp.StatusBadRequest)
ctx.SetBodyString(err.Error())
},
}

log.Fatal(httpServer.ListenAndServe(addr))
}