From 025d7ab29b249a41210e220f286939403ca99002 Mon Sep 17 00:00:00 2001 From: Kevin Yu Date: Thu, 29 Aug 2024 15:45:01 -0400 Subject: [PATCH] Rewrite uploads for static hosting --- next.config.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/next.config.js b/next.config.js index 491e16c..be09a08 100644 --- a/next.config.js +++ b/next.config.js @@ -1,7 +1,9 @@ +const RCTF_BASE = 'http://ctf.b01lers.com:9001'; + /** @type {import('next').NextConfig} */ const nextConfig = { env: { - API_BASE: 'http://ctf.b01lers.com:9001/api/v1', + API_BASE: `${RCTF_BASE}/api/v1`, KLODD_URL: 'https://instancer.b01lersc.tf' }, logging: { @@ -15,6 +17,10 @@ const nextConfig = { { source: '/api/v1/:path*', destination: `${this.env.API_BASE}/:path*` + }, + { + source: '/uploads', + destination: `${RCTF_BASE}/uploads`, } ] }