Isitha Tennakoon commited on
Commit
1326e49
·
1 Parent(s): ec4a2d8

setting up allowed origins and production endpoints

Browse files
keygenServer/client/app/main/page.tsx CHANGED
@@ -38,7 +38,7 @@ export default function MainPage() {
38
 
39
  const generateApiKey = async () => {
40
  try {
41
- const response = await fetch('http://localhost:3001/api/addKey', {
42
  method: 'POST',
43
  headers: {
44
  'Content-Type': 'application/json',
 
38
 
39
  const generateApiKey = async () => {
40
  try {
41
+ const response = await fetch('https://mcp-hackathon-tu1u.onrender.com/api/addkey', {
42
  method: 'POST',
43
  headers: {
44
  'Content-Type': 'application/json',
keygenServer/server/server.ts CHANGED
@@ -13,6 +13,7 @@ const port = process.env.PORT || 3001;
13
  // Whitelist of allowed client origins
14
  const allowedOrigins = [
15
  'http://localhost:3000',
 
16
  'http://your-production-domain.com'
17
  ];
18
 
 
13
  // Whitelist of allowed client origins
14
  const allowedOrigins = [
15
  'http://localhost:3000',
16
+ 'https://mcp-hackathon.vercel.app/',
17
  'http://your-production-domain.com'
18
  ];
19