From b21a4c7e31ff8fbb3c74cb04f87c09124285ded2 Mon Sep 17 00:00:00 2001 From: mycodedoesnotcompile2 <149587341+mycodedoesnotcompile2@users.noreply.github.com> Date: Tue, 3 Jun 2025 18:15:27 +0000 Subject: [PATCH 01/41] Update api.go --- api/api.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/api/api.go b/api/api.go index 70c224c..9785320 100644 --- a/api/api.go +++ b/api/api.go @@ -22,6 +22,7 @@ func RegisterRoutes(ctx context.Context, wg *sync.WaitGroup, engine *html.Engine AppName: "Katbox", DisableStartupMessage: true, Views: engine, + Network: "tcp", }) // static file server @@ -48,4 +49,4 @@ func RegisterRoutes(ctx context.Context, wg *sync.WaitGroup, engine *html.Engine log.Warn("Server shutdown Failed: ", err) } wg.Done() -} \ No newline at end of file +} From 20e2679dbd61cd485a78b04f48e44fd1d7145704 Mon Sep 17 00:00:00 2001 From: mycodedoesnotcompile2 <149587341+mycodedoesnotcompile2@users.noreply.github.com> Date: Tue, 3 Jun 2025 18:15:57 +0000 Subject: [PATCH 02/41] Update api.go --- api/api.go | 1 + 1 file changed, 1 insertion(+) diff --git a/api/api.go b/api/api.go index 9785320..2abc710 100644 --- a/api/api.go +++ b/api/api.go @@ -16,6 +16,7 @@ import ( ) func RegisterRoutes(ctx context.Context, wg *sync.WaitGroup, engine *html.Engine, fs http.FileSystem) { + // more Fiber options at https://docs.gofiber.io/api/fiber/ app := fiber.New(fiber.Config{ StreamRequestBody: true, ServerHeader: "Katbox", From 9607e4fd177c9df9fcc1db5ff9d4ef688163235b Mon Sep 17 00:00:00 2001 From: mycodedoesnotcompile2 <149587341+mycodedoesnotcompile2@users.noreply.github.com> Date: Sat, 13 Dec 2025 11:01:19 +0000 Subject: [PATCH 03/41] Update config.go --- internal/config/config.go | 1 + 1 file changed, 1 insertion(+) diff --git a/internal/config/config.go b/internal/config/config.go index 3a338ce..34fe314 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -17,6 +17,7 @@ type Config struct { S3Endpoint string `koanf:"S3_ENDPOINT"` Env string `koanf:"ENV"` SecretKey string `koanf:"SECRET_KEY"` + Proxy string `koanf:"PROXY"` } var Conf *Config From 3b4c17e744971d5f3f5490f22b68cc7692ad0fc9 Mon Sep 17 00:00:00 2001 From: mycodedoesnotcompile2 <149587341+mycodedoesnotcompile2@users.noreply.github.com> Date: Sat, 13 Dec 2025 11:07:30 +0000 Subject: [PATCH 04/41] Update api.go --- api/api.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/api/api.go b/api/api.go index 2abc710..323433a 100644 --- a/api/api.go +++ b/api/api.go @@ -12,6 +12,7 @@ import ( "github.com/gofiber/fiber/v2" "github.com/gofiber/fiber/v2/middleware/filesystem" + "github.com/gofiber/fiber/v2/middleware/proxy" "github.com/gofiber/template/html/v2" ) @@ -32,6 +33,11 @@ func RegisterRoutes(ctx context.Context, wg *sync.WaitGroup, engine *html.Engine Browse: config.Conf.Env == "dev", })) + if config.Conf.Proxy != "" + { + app.Use(proxy.Balancer(proxy.Config{ Servers: []string{ config.Conf.Proxy } , })) + } + routes.RegisterRoutes(app) go func(app *fiber.App) { From 86823cb2e6b251490a46437779dba512dd5b01ed Mon Sep 17 00:00:00 2001 From: mycodedoesnotcompile2 <149587341+mycodedoesnotcompile2@users.noreply.github.com> Date: Sat, 13 Dec 2025 11:12:49 +0000 Subject: [PATCH 05/41] Update api.go --- api/api.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/api/api.go b/api/api.go index 323433a..9136883 100644 --- a/api/api.go +++ b/api/api.go @@ -33,8 +33,7 @@ func RegisterRoutes(ctx context.Context, wg *sync.WaitGroup, engine *html.Engine Browse: config.Conf.Env == "dev", })) - if config.Conf.Proxy != "" - { + if config.Conf.Proxy != "" { app.Use(proxy.Balancer(proxy.Config{ Servers: []string{ config.Conf.Proxy } , })) } From 56458d4fdb31a766a327f2c73cdc76dbd917cad4 Mon Sep 17 00:00:00 2001 From: mycodedoesnotcompile2 <149587341+mycodedoesnotcompile2@users.noreply.github.com> Date: Sat, 13 Dec 2025 11:20:47 +0000 Subject: [PATCH 06/41] Update api.go --- api/api.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/api/api.go b/api/api.go index 9136883..938e59e 100644 --- a/api/api.go +++ b/api/api.go @@ -34,7 +34,9 @@ func RegisterRoutes(ctx context.Context, wg *sync.WaitGroup, engine *html.Engine })) if config.Conf.Proxy != "" { + proxy.WithTlsConfig(&tls.Config{ InsecureSkipVerify: true,}) app.Use(proxy.Balancer(proxy.Config{ Servers: []string{ config.Conf.Proxy } , })) + log.Printf('Using proxy: "%s"", config.Conf.Proxy) } routes.RegisterRoutes(app) From 29b5f5fdcd09f67717d157ae979f27cf34f1aaa2 Mon Sep 17 00:00:00 2001 From: mycodedoesnotcompile2 <149587341+mycodedoesnotcompile2@users.noreply.github.com> Date: Sat, 13 Dec 2025 11:22:53 +0000 Subject: [PATCH 07/41] Update api.go --- api/api.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/api.go b/api/api.go index 938e59e..63f3cf5 100644 --- a/api/api.go +++ b/api/api.go @@ -36,7 +36,7 @@ func RegisterRoutes(ctx context.Context, wg *sync.WaitGroup, engine *html.Engine if config.Conf.Proxy != "" { proxy.WithTlsConfig(&tls.Config{ InsecureSkipVerify: true,}) app.Use(proxy.Balancer(proxy.Config{ Servers: []string{ config.Conf.Proxy } , })) - log.Printf('Using proxy: "%s"", config.Conf.Proxy) + log.Printf('Using proxy: "%s"', config.Conf.Proxy) } routes.RegisterRoutes(app) From 8f75e96acfbf761fb79ebcccca8bc0622e7e5aa5 Mon Sep 17 00:00:00 2001 From: mycodedoesnotcompile2 <149587341+mycodedoesnotcompile2@users.noreply.github.com> Date: Sat, 13 Dec 2025 11:23:37 +0000 Subject: [PATCH 08/41] Update api.go --- api/api.go | 1 + 1 file changed, 1 insertion(+) diff --git a/api/api.go b/api/api.go index 63f3cf5..b89b726 100644 --- a/api/api.go +++ b/api/api.go @@ -4,6 +4,7 @@ import ( "context" "fmt" "net/http" + "crypto/tls" "sync" "github.com/medium.rip/api/routes" From e0e8a19963b0f1ce7baaaadb1821d2c10c1875da Mon Sep 17 00:00:00 2001 From: mycodedoesnotcompile2 <149587341+mycodedoesnotcompile2@users.noreply.github.com> Date: Sat, 13 Dec 2025 11:24:20 +0000 Subject: [PATCH 09/41] Update api.go --- api/api.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/api.go b/api/api.go index b89b726..1999b89 100644 --- a/api/api.go +++ b/api/api.go @@ -37,7 +37,7 @@ func RegisterRoutes(ctx context.Context, wg *sync.WaitGroup, engine *html.Engine if config.Conf.Proxy != "" { proxy.WithTlsConfig(&tls.Config{ InsecureSkipVerify: true,}) app.Use(proxy.Balancer(proxy.Config{ Servers: []string{ config.Conf.Proxy } , })) - log.Printf('Using proxy: "%s"', config.Conf.Proxy) + log.Printf("Using proxy: %s", config.Conf.Proxy) } routes.RegisterRoutes(app) From f2b44c60506f96838619e2d062a09182eb1529b9 Mon Sep 17 00:00:00 2001 From: mycodedoesnotcompile2 <149587341+mycodedoesnotcompile2@users.noreply.github.com> Date: Sat, 13 Dec 2025 11:32:28 +0000 Subject: [PATCH 10/41] Update api.go --- api/api.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/api.go b/api/api.go index 1999b89..ba939bd 100644 --- a/api/api.go +++ b/api/api.go @@ -35,8 +35,8 @@ func RegisterRoutes(ctx context.Context, wg *sync.WaitGroup, engine *html.Engine })) if config.Conf.Proxy != "" { - proxy.WithTlsConfig(&tls.Config{ InsecureSkipVerify: true,}) - app.Use(proxy.Balancer(proxy.Config{ Servers: []string{ config.Conf.Proxy } , })) + proxy.WithTlsConfig(&tls.Config{ InsecureSkipVerify: false,}) + app.Use(proxy.Balancer(proxy.Config{ Servers: []string{ config.Conf.Proxy, } , })) log.Printf("Using proxy: %s", config.Conf.Proxy) } From 07949db7d54f6eca619cbe6683039538949b7fe4 Mon Sep 17 00:00:00 2001 From: mycodedoesnotcompile2 <149587341+mycodedoesnotcompile2@users.noreply.github.com> Date: Sat, 13 Dec 2025 11:33:12 +0000 Subject: [PATCH 11/41] Update api.go --- api/api.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/api.go b/api/api.go index ba939bd..c3b686b 100644 --- a/api/api.go +++ b/api/api.go @@ -35,7 +35,7 @@ func RegisterRoutes(ctx context.Context, wg *sync.WaitGroup, engine *html.Engine })) if config.Conf.Proxy != "" { - proxy.WithTlsConfig(&tls.Config{ InsecureSkipVerify: false,}) + proxy.WithTlsConfig(&tls.Config{ InsecureSkipVerify: true,}) app.Use(proxy.Balancer(proxy.Config{ Servers: []string{ config.Conf.Proxy, } , })) log.Printf("Using proxy: %s", config.Conf.Proxy) } From 0a4e286b248b0a672831b0c6646a7123871e2805 Mon Sep 17 00:00:00 2001 From: mycodedoesnotcompile2 <149587341+mycodedoesnotcompile2@users.noreply.github.com> Date: Sat, 13 Dec 2025 11:44:49 +0000 Subject: [PATCH 12/41] Update api.go --- api/api.go | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/api/api.go b/api/api.go index c3b686b..b9b13b5 100644 --- a/api/api.go +++ b/api/api.go @@ -23,7 +23,7 @@ func RegisterRoutes(ctx context.Context, wg *sync.WaitGroup, engine *html.Engine StreamRequestBody: true, ServerHeader: "Katbox", AppName: "Katbox", - DisableStartupMessage: true, + DisableStartupMessage: false, Views: engine, Network: "tcp", }) @@ -36,7 +36,21 @@ func RegisterRoutes(ctx context.Context, wg *sync.WaitGroup, engine *html.Engine if config.Conf.Proxy != "" { proxy.WithTlsConfig(&tls.Config{ InsecureSkipVerify: true,}) - app.Use(proxy.Balancer(proxy.Config{ Servers: []string{ config.Conf.Proxy, } , })) + app.Use(proxy.Balancer(proxy.Config{ + Servers: []string{ config.Conf.Proxy, }, + ModifyRequest: func(c *fiber.Ctx) error { + //c.Request().Header.Add("X-Real-IP", c.IP()) + //return nil + req_code, req_body, req_errs := c.String() + log.Printf("REQUEST: %s", req_body) + }, + ModifyResponse: func(c *fiber.Ctx) error { + //c.Response().Header.Del(fiber.HeaderServer) + //return nil + res_code, res_body, res_errs := c.String() + log.Printf("RESPONSE: %s", res_body) + }, + })) log.Printf("Using proxy: %s", config.Conf.Proxy) } From 3c9cda56d4a966b1a0b803ee61fbe55eb98300fb Mon Sep 17 00:00:00 2001 From: mycodedoesnotcompile2 <149587341+mycodedoesnotcompile2@users.noreply.github.com> Date: Sat, 13 Dec 2025 11:45:38 +0000 Subject: [PATCH 13/41] Update api.go --- api/api.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/api/api.go b/api/api.go index b9b13b5..f36f2f1 100644 --- a/api/api.go +++ b/api/api.go @@ -43,12 +43,14 @@ func RegisterRoutes(ctx context.Context, wg *sync.WaitGroup, engine *html.Engine //return nil req_code, req_body, req_errs := c.String() log.Printf("REQUEST: %s", req_body) + return nil }, ModifyResponse: func(c *fiber.Ctx) error { //c.Response().Header.Del(fiber.HeaderServer) //return nil res_code, res_body, res_errs := c.String() - log.Printf("RESPONSE: %s", res_body) + log.Printf("RESPONSE: %s | %s | %s ", res_code, res_body, res_errs) + return nil }, })) log.Printf("Using proxy: %s", config.Conf.Proxy) From 2d48af0882ef54f6b1844f01f63dfac3e59adf6a Mon Sep 17 00:00:00 2001 From: mycodedoesnotcompile2 <149587341+mycodedoesnotcompile2@users.noreply.github.com> Date: Sat, 13 Dec 2025 11:46:09 +0000 Subject: [PATCH 14/41] Update api.go --- api/api.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/api.go b/api/api.go index f36f2f1..153b4ba 100644 --- a/api/api.go +++ b/api/api.go @@ -42,7 +42,7 @@ func RegisterRoutes(ctx context.Context, wg *sync.WaitGroup, engine *html.Engine //c.Request().Header.Add("X-Real-IP", c.IP()) //return nil req_code, req_body, req_errs := c.String() - log.Printf("REQUEST: %s", req_body) + log.Printf("RESPONSE: %s | %s | %s ", req_code, req_body, req_errs) return nil }, ModifyResponse: func(c *fiber.Ctx) error { From c59e028ccd9200422287f8aadcbb03a731955463 Mon Sep 17 00:00:00 2001 From: mycodedoesnotcompile2 <149587341+mycodedoesnotcompile2@users.noreply.github.com> Date: Sat, 13 Dec 2025 11:46:40 +0000 Subject: [PATCH 15/41] Update api.go --- api/api.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/api.go b/api/api.go index 153b4ba..656e9d9 100644 --- a/api/api.go +++ b/api/api.go @@ -41,14 +41,14 @@ func RegisterRoutes(ctx context.Context, wg *sync.WaitGroup, engine *html.Engine ModifyRequest: func(c *fiber.Ctx) error { //c.Request().Header.Add("X-Real-IP", c.IP()) //return nil - req_code, req_body, req_errs := c.String() + req_code, req_body, req_errs := c.Request().String() log.Printf("RESPONSE: %s | %s | %s ", req_code, req_body, req_errs) return nil }, ModifyResponse: func(c *fiber.Ctx) error { //c.Response().Header.Del(fiber.HeaderServer) //return nil - res_code, res_body, res_errs := c.String() + res_code, res_body, res_errs := c.Response().String() log.Printf("RESPONSE: %s | %s | %s ", res_code, res_body, res_errs) return nil }, From 4ae0b3c242bbad7a41b96cd5313302c001016c1a Mon Sep 17 00:00:00 2001 From: mycodedoesnotcompile2 <149587341+mycodedoesnotcompile2@users.noreply.github.com> Date: Sat, 13 Dec 2025 11:50:04 +0000 Subject: [PATCH 16/41] Update api.go --- api/api.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/api/api.go b/api/api.go index 656e9d9..f34109e 100644 --- a/api/api.go +++ b/api/api.go @@ -41,15 +41,16 @@ func RegisterRoutes(ctx context.Context, wg *sync.WaitGroup, engine *html.Engine ModifyRequest: func(c *fiber.Ctx) error { //c.Request().Header.Add("X-Real-IP", c.IP()) //return nil - req_code, req_body, req_errs := c.Request().String() - log.Printf("RESPONSE: %s | %s | %s ", req_code, req_body, req_errs) + //req_code, req_body, req_errs := c.Request().String() + //log.Printf("RESPONSE: %s | %s | %s ", req_code, req_body, req_errs) + log.Printf("REQUEST: %s", c.Request().Body()) return nil }, ModifyResponse: func(c *fiber.Ctx) error { //c.Response().Header.Del(fiber.HeaderServer) //return nil - res_code, res_body, res_errs := c.Response().String() - log.Printf("RESPONSE: %s | %s | %s ", res_code, res_body, res_errs) + //res_code, res_body, res_errs := c.Response().String() + //log.Printf("RESPONSE: %s | %s | %s ", res_code, res_body, res_errs) return nil }, })) From 21bea85895b4f6e86456b58e3dda7bb87d5ca6ea Mon Sep 17 00:00:00 2001 From: mycodedoesnotcompile2 <149587341+mycodedoesnotcompile2@users.noreply.github.com> Date: Sat, 13 Dec 2025 11:53:17 +0000 Subject: [PATCH 17/41] Update api.go --- api/api.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/api/api.go b/api/api.go index f34109e..4d9ed3f 100644 --- a/api/api.go +++ b/api/api.go @@ -43,7 +43,7 @@ func RegisterRoutes(ctx context.Context, wg *sync.WaitGroup, engine *html.Engine //return nil //req_code, req_body, req_errs := c.Request().String() //log.Printf("RESPONSE: %s | %s | %s ", req_code, req_body, req_errs) - log.Printf("REQUEST: %s", c.Request().Body()) + //log.Printf("REQUEST: %s", c.Request().Body()) return nil }, ModifyResponse: func(c *fiber.Ctx) error { @@ -51,6 +51,7 @@ func RegisterRoutes(ctx context.Context, wg *sync.WaitGroup, engine *html.Engine //return nil //res_code, res_body, res_errs := c.Response().String() //log.Printf("RESPONSE: %s | %s | %s ", res_code, res_body, res_errs) + log.Printf("RESP: %s", string(c.Response().Body())) return nil }, })) From 500eca390ff2c883ed79e350d911812b94f86bbc Mon Sep 17 00:00:00 2001 From: mycodedoesnotcompile2 <149587341+mycodedoesnotcompile2@users.noreply.github.com> Date: Sat, 13 Dec 2025 11:55:48 +0000 Subject: [PATCH 18/41] Update api.go --- api/api.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/api.go b/api/api.go index 4d9ed3f..c0c59ee 100644 --- a/api/api.go +++ b/api/api.go @@ -51,7 +51,7 @@ func RegisterRoutes(ctx context.Context, wg *sync.WaitGroup, engine *html.Engine //return nil //res_code, res_body, res_errs := c.Response().String() //log.Printf("RESPONSE: %s | %s | %s ", res_code, res_body, res_errs) - log.Printf("RESP: %s", string(c.Response().Body())) + log.Printf("RESP: %s", string(c.Response().String())) return nil }, })) From 3e95bb581e8f055037ed649c94053437f11276e5 Mon Sep 17 00:00:00 2001 From: mycodedoesnotcompile2 <149587341+mycodedoesnotcompile2@users.noreply.github.com> Date: Sat, 13 Dec 2025 11:56:33 +0000 Subject: [PATCH 19/41] Update api.go --- api/api.go | 1 + 1 file changed, 1 insertion(+) diff --git a/api/api.go b/api/api.go index c0c59ee..dbf0424 100644 --- a/api/api.go +++ b/api/api.go @@ -44,6 +44,7 @@ func RegisterRoutes(ctx context.Context, wg *sync.WaitGroup, engine *html.Engine //req_code, req_body, req_errs := c.Request().String() //log.Printf("RESPONSE: %s | %s | %s ", req_code, req_body, req_errs) //log.Printf("REQUEST: %s", c.Request().Body()) + log.Printf("RESP: %s", string(c.Request().String())) return nil }, ModifyResponse: func(c *fiber.Ctx) error { From 7d6e0c0aa87063ee6a7f17b1d5d37a1f31b24345 Mon Sep 17 00:00:00 2001 From: mycodedoesnotcompile2 <149587341+mycodedoesnotcompile2@users.noreply.github.com> Date: Sat, 13 Dec 2025 12:00:48 +0000 Subject: [PATCH 20/41] Update api.go --- api/api.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/api/api.go b/api/api.go index dbf0424..3df3947 100644 --- a/api/api.go +++ b/api/api.go @@ -34,6 +34,7 @@ func RegisterRoutes(ctx context.Context, wg *sync.WaitGroup, engine *html.Engine Browse: config.Conf.Env == "dev", })) + /* if config.Conf.Proxy != "" { proxy.WithTlsConfig(&tls.Config{ InsecureSkipVerify: true,}) app.Use(proxy.Balancer(proxy.Config{ @@ -58,6 +59,7 @@ func RegisterRoutes(ctx context.Context, wg *sync.WaitGroup, engine *html.Engine })) log.Printf("Using proxy: %s", config.Conf.Proxy) } + */ routes.RegisterRoutes(app) From 39a72c9197d285b5441c6de62d6061885f47613d Mon Sep 17 00:00:00 2001 From: mycodedoesnotcompile2 <149587341+mycodedoesnotcompile2@users.noreply.github.com> Date: Sat, 13 Dec 2025 12:04:55 +0000 Subject: [PATCH 21/41] Update id_converter.go --- pkg/converters/id_converter.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/converters/id_converter.go b/pkg/converters/id_converter.go index 1f4a808..d92e2e4 100644 --- a/pkg/converters/id_converter.go +++ b/pkg/converters/id_converter.go @@ -34,6 +34,8 @@ func idFromPath(path string) string { func idFromParams(c *fiber.Ctx) string { ru := c.Query("redirectUrl", "") + log.Printf("REQ: %s", string(c.Request().String())) + log.Printf("RESP: %s", string(c.Response().String())) if ru != "" { pu, err := url.Parse(ru) if err != nil { From 49c695a2915e3b646e949a97f7a5ea9423b8dd68 Mon Sep 17 00:00:00 2001 From: mycodedoesnotcompile2 <149587341+mycodedoesnotcompile2@users.noreply.github.com> Date: Sat, 13 Dec 2025 12:05:19 +0000 Subject: [PATCH 22/41] Update id_converter.go --- pkg/converters/id_converter.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/converters/id_converter.go b/pkg/converters/id_converter.go index d92e2e4..6ac0f1a 100644 --- a/pkg/converters/id_converter.go +++ b/pkg/converters/id_converter.go @@ -6,6 +6,7 @@ import ( "strings" "github.com/gofiber/fiber/v2" + log "github.com/sirupsen/logrus" ) var r = regexp.MustCompile(`[\/\-]([0-9a-f]+)\/?$`) From 94a0f174d692ec8322132cf8a9afb8d921170074 Mon Sep 17 00:00:00 2001 From: mycodedoesnotcompile2 <149587341+mycodedoesnotcompile2@users.noreply.github.com> Date: Sat, 13 Dec 2025 12:05:50 +0000 Subject: [PATCH 23/41] Update api.go --- api/api.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/api/api.go b/api/api.go index 3df3947..f15e59d 100644 --- a/api/api.go +++ b/api/api.go @@ -4,7 +4,7 @@ import ( "context" "fmt" "net/http" - "crypto/tls" + "sync" "github.com/medium.rip/api/routes" @@ -13,7 +13,8 @@ import ( "github.com/gofiber/fiber/v2" "github.com/gofiber/fiber/v2/middleware/filesystem" - "github.com/gofiber/fiber/v2/middleware/proxy" + //"github.com/gofiber/fiber/v2/middleware/proxy" + //"crypto/tls" "github.com/gofiber/template/html/v2" ) From fd56a322f31286bd18578b4b622686b48f04b383 Mon Sep 17 00:00:00 2001 From: mycodedoesnotcompile2 <149587341+mycodedoesnotcompile2@users.noreply.github.com> Date: Sat, 13 Dec 2025 12:19:52 +0000 Subject: [PATCH 24/41] Update medium_client.go --- pkg/client/medium_client.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/pkg/client/medium_client.go b/pkg/client/medium_client.go index 117aa84..13bdfcb 100644 --- a/pkg/client/medium_client.go +++ b/pkg/client/medium_client.go @@ -36,6 +36,20 @@ func PostData(postId string) (*entities.MediumResponse, error) { payload := strings.NewReader(fmt.Sprintf("{\"query\":\"query {\\n post(id: \\\"%s\\\") {\\n title\\n createdAt\\n creator {\\n id\\n name\\n }\\n content {\\n bodyModel {\\n paragraphs {\\n name\\n text\\n type\\n href\\n layout\\n markups {\\n title\\n type\\n href\\n userId\\n start\\n end\\n anchorType\\n }\\n iframe {\\n mediaResource {\\n href\\n iframeSrc\\n iframeWidth\\n iframeHeight\\n }\\n }\\n metadata {\\n id\\n originalWidth\\n originalHeight\\n }\\n }\\n }\\n }\\n }\\n }\",\"variables\":{}}", postId)) client := &http.Client{} + + if config.Conf.Proxy != "" { + proxyURL, err := url.Parse(config.Conf.Proxy) + if err != nil { + panic(err) + } + client := &http.Client{ + Transport: &http.Transport{ + Proxy: http.ProxyURL(proxyURL), + }, + } + log.Printf("Using proxy: %s", config.Conf.Proxy) + } + req, err := http.NewRequest(method, url, payload) if err != nil { log.Printf("Error constructing request %v\n", err) From 36e5fe60e705cfc6d54594da08cfa1aeca6253dc Mon Sep 17 00:00:00 2001 From: mycodedoesnotcompile2 <149587341+mycodedoesnotcompile2@users.noreply.github.com> Date: Sat, 13 Dec 2025 12:20:37 +0000 Subject: [PATCH 25/41] Update id_converter.go --- pkg/converters/id_converter.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/converters/id_converter.go b/pkg/converters/id_converter.go index 6ac0f1a..72cf7a6 100644 --- a/pkg/converters/id_converter.go +++ b/pkg/converters/id_converter.go @@ -35,8 +35,8 @@ func idFromPath(path string) string { func idFromParams(c *fiber.Ctx) string { ru := c.Query("redirectUrl", "") - log.Printf("REQ: %s", string(c.Request().String())) - log.Printf("RESP: %s", string(c.Response().String())) + //log.Printf("REQ: %s", string(c.Request().String())) + //log.Printf("RESP: %s", string(c.Response().String())) if ru != "" { pu, err := url.Parse(ru) if err != nil { From 9bb6d7e79e871d68effb656108c5362213ad56d9 Mon Sep 17 00:00:00 2001 From: mycodedoesnotcompile2 <149587341+mycodedoesnotcompile2@users.noreply.github.com> Date: Sat, 13 Dec 2025 12:21:27 +0000 Subject: [PATCH 26/41] Update medium_client.go --- pkg/client/medium_client.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/client/medium_client.go b/pkg/client/medium_client.go index 13bdfcb..82d653a 100644 --- a/pkg/client/medium_client.go +++ b/pkg/client/medium_client.go @@ -6,6 +6,7 @@ import ( "net/http" "os" "strings" + "net/url" log "github.com/sirupsen/logrus" From 6c0f2a15c9999729a980929e21a0de26cfb9a4d0 Mon Sep 17 00:00:00 2001 From: mycodedoesnotcompile2 <149587341+mycodedoesnotcompile2@users.noreply.github.com> Date: Sat, 13 Dec 2025 12:21:36 +0000 Subject: [PATCH 27/41] Update id_converter.go --- pkg/converters/id_converter.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/converters/id_converter.go b/pkg/converters/id_converter.go index 72cf7a6..f8451cf 100644 --- a/pkg/converters/id_converter.go +++ b/pkg/converters/id_converter.go @@ -6,7 +6,7 @@ import ( "strings" "github.com/gofiber/fiber/v2" - log "github.com/sirupsen/logrus" + //log "github.com/sirupsen/logrus" ) var r = regexp.MustCompile(`[\/\-]([0-9a-f]+)\/?$`) From f3beb86ec100181edd9f1fde8c622d102e6a47ba Mon Sep 17 00:00:00 2001 From: mycodedoesnotcompile2 <149587341+mycodedoesnotcompile2@users.noreply.github.com> Date: Sat, 13 Dec 2025 12:22:43 +0000 Subject: [PATCH 28/41] Update medium_client.go --- pkg/client/medium_client.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/client/medium_client.go b/pkg/client/medium_client.go index 82d653a..2212d28 100644 --- a/pkg/client/medium_client.go +++ b/pkg/client/medium_client.go @@ -31,7 +31,7 @@ func PostData(postId string) (*entities.MediumResponse, error) { } // http client to post data - url := "https://medium.com/_/graphql" + urlreq := "https://medium.com/_/graphql" method := "POST" payload := strings.NewReader(fmt.Sprintf("{\"query\":\"query {\\n post(id: \\\"%s\\\") {\\n title\\n createdAt\\n creator {\\n id\\n name\\n }\\n content {\\n bodyModel {\\n paragraphs {\\n name\\n text\\n type\\n href\\n layout\\n markups {\\n title\\n type\\n href\\n userId\\n start\\n end\\n anchorType\\n }\\n iframe {\\n mediaResource {\\n href\\n iframeSrc\\n iframeWidth\\n iframeHeight\\n }\\n }\\n metadata {\\n id\\n originalWidth\\n originalHeight\\n }\\n }\\n }\\n }\\n }\\n }\",\"variables\":{}}", postId)) @@ -51,7 +51,7 @@ func PostData(postId string) (*entities.MediumResponse, error) { log.Printf("Using proxy: %s", config.Conf.Proxy) } - req, err := http.NewRequest(method, url, payload) + req, err := http.NewRequest(method, urlreq, payload) if err != nil { log.Printf("Error constructing request %v\n", err) return nil, err From 2965aeb5922717082e35bb244f9840a46d7a8496 Mon Sep 17 00:00:00 2001 From: mycodedoesnotcompile2 <149587341+mycodedoesnotcompile2@users.noreply.github.com> Date: Sat, 13 Dec 2025 12:26:05 +0000 Subject: [PATCH 29/41] Update medium_client.go --- pkg/client/medium_client.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pkg/client/medium_client.go b/pkg/client/medium_client.go index 2212d28..8b8ddee 100644 --- a/pkg/client/medium_client.go +++ b/pkg/client/medium_client.go @@ -7,6 +7,7 @@ import ( "os" "strings" "net/url" + "crypto/tls" log "github.com/sirupsen/logrus" @@ -36,7 +37,7 @@ func PostData(postId string) (*entities.MediumResponse, error) { payload := strings.NewReader(fmt.Sprintf("{\"query\":\"query {\\n post(id: \\\"%s\\\") {\\n title\\n createdAt\\n creator {\\n id\\n name\\n }\\n content {\\n bodyModel {\\n paragraphs {\\n name\\n text\\n type\\n href\\n layout\\n markups {\\n title\\n type\\n href\\n userId\\n start\\n end\\n anchorType\\n }\\n iframe {\\n mediaResource {\\n href\\n iframeSrc\\n iframeWidth\\n iframeHeight\\n }\\n }\\n metadata {\\n id\\n originalWidth\\n originalHeight\\n }\\n }\\n }\\n }\\n }\\n }\",\"variables\":{}}", postId)) - client := &http.Client{} + if config.Conf.Proxy != "" { proxyURL, err := url.Parse(config.Conf.Proxy) @@ -46,10 +47,15 @@ func PostData(postId string) (*entities.MediumResponse, error) { client := &http.Client{ Transport: &http.Transport{ Proxy: http.ProxyURL(proxyURL), + TLSClientConfig: &tls.Config{ + InsecureSkipVerify: true, // Skip TLS verification }, } log.Printf("Using proxy: %s", config.Conf.Proxy) } + else { + client := &http.Client{} + } req, err := http.NewRequest(method, urlreq, payload) if err != nil { From 93f30a5a9ad7a9b032553fb3c8255bee04eb4bbd Mon Sep 17 00:00:00 2001 From: mycodedoesnotcompile2 <149587341+mycodedoesnotcompile2@users.noreply.github.com> Date: Sat, 13 Dec 2025 12:26:57 +0000 Subject: [PATCH 30/41] Update medium_client.go --- pkg/client/medium_client.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/client/medium_client.go b/pkg/client/medium_client.go index 8b8ddee..29a100c 100644 --- a/pkg/client/medium_client.go +++ b/pkg/client/medium_client.go @@ -48,10 +48,10 @@ func PostData(postId string) (*entities.MediumResponse, error) { Transport: &http.Transport{ Proxy: http.ProxyURL(proxyURL), TLSClientConfig: &tls.Config{ - InsecureSkipVerify: true, // Skip TLS verification - }, - } - log.Printf("Using proxy: %s", config.Conf.Proxy) + InsecureSkipVerify: true, // Skip TLS verification }, + } + } + log.Printf("Using proxy: %s", config.Conf.Proxy) } else { client := &http.Client{} From d416ebad0f5d400ccb6c818e5354e5eaa144a09a Mon Sep 17 00:00:00 2001 From: mycodedoesnotcompile2 <149587341+mycodedoesnotcompile2@users.noreply.github.com> Date: Sat, 13 Dec 2025 12:28:35 +0000 Subject: [PATCH 31/41] Update medium_client.go --- pkg/client/medium_client.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pkg/client/medium_client.go b/pkg/client/medium_client.go index 29a100c..80258b0 100644 --- a/pkg/client/medium_client.go +++ b/pkg/client/medium_client.go @@ -48,10 +48,11 @@ func PostData(postId string) (*entities.MediumResponse, error) { Transport: &http.Transport{ Proxy: http.ProxyURL(proxyURL), TLSClientConfig: &tls.Config{ - InsecureSkipVerify: true, // Skip TLS verification }, - } + InsecureSkipVerify: true, + }, } - log.Printf("Using proxy: %s", config.Conf.Proxy) + } + log.Printf("Using proxy: %s", config.Conf.Proxy) } else { client := &http.Client{} From e50177599e36d9c35c4f7345a88e5371682b7592 Mon Sep 17 00:00:00 2001 From: mycodedoesnotcompile2 <149587341+mycodedoesnotcompile2@users.noreply.github.com> Date: Sat, 13 Dec 2025 12:29:15 +0000 Subject: [PATCH 32/41] Update medium_client.go --- pkg/client/medium_client.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/client/medium_client.go b/pkg/client/medium_client.go index 80258b0..0c843d9 100644 --- a/pkg/client/medium_client.go +++ b/pkg/client/medium_client.go @@ -50,7 +50,7 @@ func PostData(postId string) (*entities.MediumResponse, error) { TLSClientConfig: &tls.Config{ InsecureSkipVerify: true, }, - } + }, } log.Printf("Using proxy: %s", config.Conf.Proxy) } From 6c9ba437a8eba858dba2b1acdfa834aaee040099 Mon Sep 17 00:00:00 2001 From: mycodedoesnotcompile2 <149587341+mycodedoesnotcompile2@users.noreply.github.com> Date: Sat, 13 Dec 2025 12:29:45 +0000 Subject: [PATCH 33/41] Update medium_client.go --- pkg/client/medium_client.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkg/client/medium_client.go b/pkg/client/medium_client.go index 0c843d9..24bba58 100644 --- a/pkg/client/medium_client.go +++ b/pkg/client/medium_client.go @@ -53,8 +53,7 @@ func PostData(postId string) (*entities.MediumResponse, error) { }, } log.Printf("Using proxy: %s", config.Conf.Proxy) - } - else { + } else { client := &http.Client{} } From d055ff6c72f174530aaaa9cacd38a0470cb55f5b Mon Sep 17 00:00:00 2001 From: mycodedoesnotcompile2 <149587341+mycodedoesnotcompile2@users.noreply.github.com> Date: Sat, 13 Dec 2025 12:31:48 +0000 Subject: [PATCH 34/41] Update medium_client.go --- pkg/client/medium_client.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pkg/client/medium_client.go b/pkg/client/medium_client.go index 24bba58..9984503 100644 --- a/pkg/client/medium_client.go +++ b/pkg/client/medium_client.go @@ -37,14 +37,15 @@ func PostData(postId string) (*entities.MediumResponse, error) { payload := strings.NewReader(fmt.Sprintf("{\"query\":\"query {\\n post(id: \\\"%s\\\") {\\n title\\n createdAt\\n creator {\\n id\\n name\\n }\\n content {\\n bodyModel {\\n paragraphs {\\n name\\n text\\n type\\n href\\n layout\\n markups {\\n title\\n type\\n href\\n userId\\n start\\n end\\n anchorType\\n }\\n iframe {\\n mediaResource {\\n href\\n iframeSrc\\n iframeWidth\\n iframeHeight\\n }\\n }\\n metadata {\\n id\\n originalWidth\\n originalHeight\\n }\\n }\\n }\\n }\\n }\\n }\",\"variables\":{}}", postId)) - + + var client *http.Client if config.Conf.Proxy != "" { proxyURL, err := url.Parse(config.Conf.Proxy) if err != nil { panic(err) } - client := &http.Client{ + client = &http.Client{ Transport: &http.Transport{ Proxy: http.ProxyURL(proxyURL), TLSClientConfig: &tls.Config{ @@ -54,7 +55,7 @@ func PostData(postId string) (*entities.MediumResponse, error) { } log.Printf("Using proxy: %s", config.Conf.Proxy) } else { - client := &http.Client{} + client = &http.Client{} } req, err := http.NewRequest(method, urlreq, payload) From 348e4e2527615708b5b7eff51b1a3c1bf298f00d Mon Sep 17 00:00:00 2001 From: mycodedoesnotcompile2 <149587341+mycodedoesnotcompile2@users.noreply.github.com> Date: Sat, 13 Dec 2025 12:39:16 +0000 Subject: [PATCH 35/41] Update medium_client.go --- pkg/client/medium_client.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/client/medium_client.go b/pkg/client/medium_client.go index 9984503..600c700 100644 --- a/pkg/client/medium_client.go +++ b/pkg/client/medium_client.go @@ -34,9 +34,11 @@ func PostData(postId string) (*entities.MediumResponse, error) { // http client to post data urlreq := "https://medium.com/_/graphql" method := "POST" - + payload := strings.NewReader(fmt.Sprintf("{\"query\":\"query {\\n post(id: \\\"%s\\\") {\\n title\\n createdAt\\n creator {\\n id\\n name\\n }\\n content {\\n bodyModel {\\n paragraphs {\\n name\\n text\\n type\\n href\\n layout\\n markups {\\n title\\n type\\n href\\n userId\\n start\\n end\\n anchorType\\n }\\n iframe {\\n mediaResource {\\n href\\n iframeSrc\\n iframeWidth\\n iframeHeight\\n }\\n }\\n metadata {\\n id\\n originalWidth\\n originalHeight\\n }\\n }\\n }\\n }\\n }\\n }\",\"variables\":{}}", postId)) + log.Printf("Article ID: %s", postId) + log.Printf("PAYLOAD: %s", payload) var client *http.Client From 8b00007fb5685593b3baabf8ab7ea63fa6eecacf Mon Sep 17 00:00:00 2001 From: mycodedoesnotcompile2 <149587341+mycodedoesnotcompile2@users.noreply.github.com> Date: Sat, 13 Dec 2025 12:41:04 +0000 Subject: [PATCH 36/41] Update medium_client.go --- pkg/client/medium_client.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/client/medium_client.go b/pkg/client/medium_client.go index 600c700..4a85406 100644 --- a/pkg/client/medium_client.go +++ b/pkg/client/medium_client.go @@ -61,6 +61,7 @@ func PostData(postId string) (*entities.MediumResponse, error) { } req, err := http.NewRequest(method, urlreq, payload) + req.Header.Set("User-Agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Safari/537.36") if err != nil { log.Printf("Error constructing request %v\n", err) return nil, err From 9a6d2876073e890eae290bb32a68ec757e4b8a5e Mon Sep 17 00:00:00 2001 From: mycodedoesnotcompile2 <149587341+mycodedoesnotcompile2@users.noreply.github.com> Date: Sat, 13 Dec 2025 12:42:34 +0000 Subject: [PATCH 37/41] Update id_converter.go --- pkg/converters/id_converter.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/pkg/converters/id_converter.go b/pkg/converters/id_converter.go index f8451cf..1f4a808 100644 --- a/pkg/converters/id_converter.go +++ b/pkg/converters/id_converter.go @@ -6,7 +6,6 @@ import ( "strings" "github.com/gofiber/fiber/v2" - //log "github.com/sirupsen/logrus" ) var r = regexp.MustCompile(`[\/\-]([0-9a-f]+)\/?$`) @@ -35,8 +34,6 @@ func idFromPath(path string) string { func idFromParams(c *fiber.Ctx) string { ru := c.Query("redirectUrl", "") - //log.Printf("REQ: %s", string(c.Request().String())) - //log.Printf("RESP: %s", string(c.Response().String())) if ru != "" { pu, err := url.Parse(ru) if err != nil { From b387a6d8f8320a38774d0c3ad24c163c64c40a26 Mon Sep 17 00:00:00 2001 From: mycodedoesnotcompile2 <149587341+mycodedoesnotcompile2@users.noreply.github.com> Date: Sat, 13 Dec 2025 12:43:46 +0000 Subject: [PATCH 38/41] Update api.go --- api/api.go | 25 +------------------------ 1 file changed, 1 insertion(+), 24 deletions(-) diff --git a/api/api.go b/api/api.go index f15e59d..1ce208b 100644 --- a/api/api.go +++ b/api/api.go @@ -24,7 +24,7 @@ func RegisterRoutes(ctx context.Context, wg *sync.WaitGroup, engine *html.Engine StreamRequestBody: true, ServerHeader: "Katbox", AppName: "Katbox", - DisableStartupMessage: false, + DisableStartupMessage: true, Views: engine, Network: "tcp", }) @@ -35,32 +35,9 @@ func RegisterRoutes(ctx context.Context, wg *sync.WaitGroup, engine *html.Engine Browse: config.Conf.Env == "dev", })) - /* if config.Conf.Proxy != "" { - proxy.WithTlsConfig(&tls.Config{ InsecureSkipVerify: true,}) - app.Use(proxy.Balancer(proxy.Config{ - Servers: []string{ config.Conf.Proxy, }, - ModifyRequest: func(c *fiber.Ctx) error { - //c.Request().Header.Add("X-Real-IP", c.IP()) - //return nil - //req_code, req_body, req_errs := c.Request().String() - //log.Printf("RESPONSE: %s | %s | %s ", req_code, req_body, req_errs) - //log.Printf("REQUEST: %s", c.Request().Body()) - log.Printf("RESP: %s", string(c.Request().String())) - return nil - }, - ModifyResponse: func(c *fiber.Ctx) error { - //c.Response().Header.Del(fiber.HeaderServer) - //return nil - //res_code, res_body, res_errs := c.Response().String() - //log.Printf("RESPONSE: %s | %s | %s ", res_code, res_body, res_errs) - log.Printf("RESP: %s", string(c.Response().String())) - return nil - }, - })) log.Printf("Using proxy: %s", config.Conf.Proxy) } - */ routes.RegisterRoutes(app) From e549b25e3a8f3f674b90304e33e8cebfa61ca701 Mon Sep 17 00:00:00 2001 From: mycodedoesnotcompile2 <149587341+mycodedoesnotcompile2@users.noreply.github.com> Date: Sat, 13 Dec 2025 12:44:03 +0000 Subject: [PATCH 39/41] Update api.go --- api/api.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/api/api.go b/api/api.go index 1ce208b..c3f4351 100644 --- a/api/api.go +++ b/api/api.go @@ -13,8 +13,6 @@ import ( "github.com/gofiber/fiber/v2" "github.com/gofiber/fiber/v2/middleware/filesystem" - //"github.com/gofiber/fiber/v2/middleware/proxy" - //"crypto/tls" "github.com/gofiber/template/html/v2" ) From b5784f609e3d2850cdc533dcd8db9c9cc72561c5 Mon Sep 17 00:00:00 2001 From: mycodedoesnotcompile2 <149587341+mycodedoesnotcompile2@users.noreply.github.com> Date: Sat, 13 Dec 2025 12:45:06 +0000 Subject: [PATCH 40/41] Update medium_client.go --- pkg/client/medium_client.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pkg/client/medium_client.go b/pkg/client/medium_client.go index 4a85406..6f1c13a 100644 --- a/pkg/client/medium_client.go +++ b/pkg/client/medium_client.go @@ -37,8 +37,8 @@ func PostData(postId string) (*entities.MediumResponse, error) { payload := strings.NewReader(fmt.Sprintf("{\"query\":\"query {\\n post(id: \\\"%s\\\") {\\n title\\n createdAt\\n creator {\\n id\\n name\\n }\\n content {\\n bodyModel {\\n paragraphs {\\n name\\n text\\n type\\n href\\n layout\\n markups {\\n title\\n type\\n href\\n userId\\n start\\n end\\n anchorType\\n }\\n iframe {\\n mediaResource {\\n href\\n iframeSrc\\n iframeWidth\\n iframeHeight\\n }\\n }\\n metadata {\\n id\\n originalWidth\\n originalHeight\\n }\\n }\\n }\\n }\\n }\\n }\",\"variables\":{}}", postId)) - log.Printf("Article ID: %s", postId) - log.Printf("PAYLOAD: %s", payload) + //log.Printf("Article ID: %s", postId) + //log.Printf("PAYLOAD: %s", payload) var client *http.Client @@ -55,7 +55,6 @@ func PostData(postId string) (*entities.MediumResponse, error) { }, }, } - log.Printf("Using proxy: %s", config.Conf.Proxy) } else { client = &http.Client{} } From 13b3abbcabc85f15788387bbc3d4cb91c9a87fc4 Mon Sep 17 00:00:00 2001 From: mycodedoesnotcompile2 <149587341+mycodedoesnotcompile2@users.noreply.github.com> Date: Sat, 13 Dec 2025 13:12:29 +0000 Subject: [PATCH 41/41] Rename postcss.config.ts to postcss.config.cjs --- frontend/{postcss.config.ts => postcss.config.cjs} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename frontend/{postcss.config.ts => postcss.config.cjs} (100%) diff --git a/frontend/postcss.config.ts b/frontend/postcss.config.cjs similarity index 100% rename from frontend/postcss.config.ts rename to frontend/postcss.config.cjs