Enable CORS from any origin

Signed-off-by: Fred Boniface <fred@fjla.uk>
This commit is contained in:
Fred Boniface 2023-06-17 21:53:36 +01:00
parent e4255e9cbf
commit 06259e3d9f
2 changed files with 2 additions and 4 deletions

4
app.js
View File

@ -65,9 +65,7 @@ app.use((err, req, res, next) => {
}); });
// Global Middleware: // Global Middleware:
app.use(cors({ app.use(cors()); // Allow access from any origin
origin: 'https://svelte.owlboard.info'
})); // Allow test site origins access to API
app.use(express.json()); //JSON Parsing for POST Requests app.use(express.json()); //JSON Parsing for POST Requests
app.use(compression()); // Compress API Data if supported by client app.use(compression()); // Compress API Data if supported by client
app.use(limiter); app.use(limiter);

View File

@ -1,6 +1,6 @@
const version = { const version = {
api: ['/api/v1/',], api: ['/api/v1/',],
app: '2023.6.6' app: '2023.6.7'
}; };
module.exports = version; module.exports = version;