We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4114e6d commit e497118Copy full SHA for e497118
api/generate.js
@@ -1,6 +1,11 @@
1
import { WordGenerator } from '../lib/WordGenerator.js';
2
3
export default function handler(req, res) {
4
+ // Set CORS headers
5
+ res.setHeader('Access-Control-Allow-Origin', '*');
6
+ res.setHeader('Access-Control-Allow-Methods', 'GET');
7
+ res.setHeader('Access-Control-Allow-Headers', 'Content-Type');
8
+
9
const { wordList = 'latin', format = 'string', limit = 10 } = req.query;
10
11
// Initialize WordGenerator with the requested options
0 commit comments