fix(gtm): Use relative API path to support subdirectory deployment
This commit is contained in:
@@ -260,7 +260,7 @@ const App: React.FC = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const callBackend = async (mode: string, data: any) => {
|
const callBackend = async (mode: string, data: any) => {
|
||||||
const response = await fetch('/api/gtm', {
|
const response = await fetch('./api/gtm', {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
headers: { 'Content-Type': 'application/json' },
|
headers: { 'Content-Type': 'application/json' },
|
||||||
body: JSON.stringify({ mode, data })
|
body: JSON.stringify({ mode, data })
|
||||||
|
|||||||
Reference in New Issue
Block a user