We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0a8eb8c commit 6863460Copy full SHA for 6863460
packages/micro-analytics-cli/src/handler.js
@@ -53,6 +53,10 @@ async function analyticsHandler(req, res) {
53
if (pathname.length <= 1) {
54
throw createError(400, 'Please include a path to a page.');
55
}
56
+ if (req.method === 'OPTIONS') {
57
+ res.setHeader('Access-Control-Allow-Headers', 'content-type');
58
+ return send(res, 204);
59
+ }
60
if (req.method !== 'GET' && req.method !== 'POST') {
61
throw createError(400, 'Please make a GET or a POST request.');
62
0 commit comments