needware-cli 1.6.2 → 1.6.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -120,8 +120,11 @@ const corsHeaders = {
|
|
|
120
120
|
"Access-Control-Allow-Origin": "*",
|
|
121
121
|
"Access-Control-Allow-Headers":
|
|
122
122
|
"authorization, x-client-info, apikey, content-type",
|
|
123
|
+
"Access-Control-Allow-Methods": "POST, OPTIONS",
|
|
124
|
+
"Access-Control-Max-Age": "86400",
|
|
123
125
|
};
|
|
124
126
|
|
|
127
|
+
|
|
125
128
|
interface EmailRequest {
|
|
126
129
|
to: string;
|
|
127
130
|
subject: string;
|
|
@@ -131,7 +134,10 @@ interface EmailRequest {
|
|
|
131
134
|
const handler = async (req: Request): Promise<Response> => {
|
|
132
135
|
// Handle CORS preflight requests
|
|
133
136
|
if (req.method === "OPTIONS") {
|
|
134
|
-
return new Response(null, {
|
|
137
|
+
return new Response(null, {
|
|
138
|
+
status: 200,
|
|
139
|
+
headers: corsHeaders
|
|
140
|
+
});
|
|
135
141
|
}
|
|
136
142
|
|
|
137
143
|
try {
|
|
@@ -186,7 +192,10 @@ interface BatchEmailRequest {
|
|
|
186
192
|
|
|
187
193
|
const handler = async (req: Request): Promise<Response> => {
|
|
188
194
|
if (req.method === "OPTIONS") {
|
|
189
|
-
return new Response(null, {
|
|
195
|
+
return new Response(null, {
|
|
196
|
+
status: 200,
|
|
197
|
+
headers: corsHeaders
|
|
198
|
+
});
|
|
190
199
|
}
|
|
191
200
|
|
|
192
201
|
try {
|
|
@@ -251,6 +260,8 @@ const corsHeaders = {
|
|
|
251
260
|
"Access-Control-Allow-Origin": "*",
|
|
252
261
|
"Access-Control-Allow-Headers":
|
|
253
262
|
"authorization, x-client-info, apikey, content-type",
|
|
263
|
+
"Access-Control-Allow-Methods": "POST, OPTIONS",
|
|
264
|
+
"Access-Control-Max-Age": "86400",
|
|
254
265
|
};
|
|
255
266
|
|
|
256
267
|
interface AlertEmailRequest {
|