url fixes
This commit is contained in:
@@ -89,7 +89,9 @@ export function TerminalGuestbook({ dict }: { dict: Dictionary["guestbook"] }) {
|
|||||||
setIsSubmitting(true);
|
setIsSubmitting(true);
|
||||||
|
|
||||||
const proxyUrl =
|
const proxyUrl =
|
||||||
process.env.NEXT_PUBLIC_PROXY_URL || "http://localhost:3001";
|
process.env.NODE_ENV === "production"
|
||||||
|
? "/api/proxy"
|
||||||
|
: "http://localhost:3001";
|
||||||
|
|
||||||
const res = await fetch(`${proxyUrl}/api/comments`, {
|
const res = await fetch(`${proxyUrl}/api/comments`, {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
|
|||||||
Reference in New Issue
Block a user