diff --git a/npm-config.conf b/npm-config.conf new file mode 100644 index 0000000..93bfedf --- /dev/null +++ b/npm-config.conf @@ -0,0 +1,12 @@ +proxy_buffers 8 16k; +proxy_buffer_size 32k; + +# CORS headers for Flutter web +add_header Access-Control-Allow-Origin "https://home.schweitz.net" always; +add_header Access-Control-Allow-Credentials true always; +add_header Access-Control-Allow-Methods "GET, POST, PUT, DELETE, PATCH, OPTIONS" always; +add_header Access-Control-Allow-Headers "Content-Type, Authorization" always; + +if ($request_method = OPTIONS) { + return 204; +} \ No newline at end of file