Disable helmet security headers and use relative API URLs to fix HTTP access
This commit is contained in:
@@ -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());
|
||||
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user