diff --git a/netlify.toml b/netlify.toml new file mode 100644 index 0000000000000000000000000000000000000000..a654cf571193beeed8eb819fca6c249f2d294875 --- /dev/null +++ b/netlify.toml @@ -0,0 +1,6 @@ +[[redirects]] + from = "/api/*" + to = "https://ajou-eats-api.seunglab.dev/api/:splat" + status = 200 + force = true + secure = true diff --git a/src/setupProxy.js b/src/setupProxy.js index 8361d424642676d943a754b4393702d459812951..d68b7831527758fca7dbb98c05770c2265fd6e48 100644 --- a/src/setupProxy.js +++ b/src/setupProxy.js @@ -5,6 +5,7 @@ module.exports = function (app) { createProxyMiddleware('/api', { target: 'https://ajou-eats-api.seunglab.dev', changeOrigin: true, + secure: true }), ); }; diff --git a/vercel.json b/vercel.json new file mode 100644 index 0000000000000000000000000000000000000000..3dc4fe15fdd53a58e342a809571f8881c35b3f2a --- /dev/null +++ b/vercel.json @@ -0,0 +1,12 @@ +{ + "rewrites": [ + { + "source": "/api/:path*", + "destination": "https://ajou-eats-api.seunglab.dev/api/:path*" + }, + { + "source": "/api/:path*/", + "destination": "https://ajou-eats-api.seunglab.dev/api/:path*/" + } + ] +}