Disable helmet security headers and use relative API URLs to fix HTTP access

This commit is contained in:
Ryderjj89
2025-09-13 15:36:27 -04:00
parent 0232b854c9
commit eb81bdc9e6
2 changed files with 7 additions and 2 deletions

View File

@@ -8,7 +8,12 @@ const app = express();
const PORT = process.env.PORT || 3000;
// Middleware
app.use(helmet());
app.use(helmet({
contentSecurityPolicy: false,
crossOriginOpenerPolicy: false,
crossOriginEmbedderPolicy: false,
originAgentCluster: false
}));
app.use(cors());
app.use(express.json());

View File

@@ -1,6 +1,6 @@
import axios from 'axios';
const API_BASE_URL = process.env.REACT_APP_API_URL || 'http://localhost:3000';
const API_BASE_URL = process.env.REACT_APP_API_URL || '';
const api = axios.create({
baseURL: API_BASE_URL,