diff --git a/services/rssapp/index.js b/services/rssapp/index.js index f6b3a88..adcd1d5 100644 --- a/services/rssapp/index.js +++ b/services/rssapp/index.js @@ -1,16 +1,15 @@ // index.js import Fastify from "fastify"; -import fs from "fs"; -import path from "path"; import RSS from "rss"; import TTLCache from '@isaacs/ttlcache'; import '@dotenvx/dotenvx/config.js'; import { ApifyClient } from 'apify-client'; import { env } from './env.js'; import packageJson from "./package.json" with { type: "json" }; +import cors from '@fastify/cors' const fastify = Fastify({ logger: true }); - +fastify.register(cors); const client = new ApifyClient({ token: env.APIFY_TOKEN, diff --git a/services/rssapp/package-lock.json b/services/rssapp/package-lock.json index 5fb07de..5b3d9ea 100644 --- a/services/rssapp/package-lock.json +++ b/services/rssapp/package-lock.json @@ -1,15 +1,16 @@ { "name": "rssapp", - "version": "69.0.0", + "version": "69.0.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "rssapp", - "version": "69.0.0", + "version": "69.0.1", "license": "Unlicense", "dependencies": { "@dotenvx/dotenvx": "^1.49.0", + "@fastify/cors": "^11.1.0", "@isaacs/ttlcache": "^1.4.1", "apify-client": "^2.15.1", "fastify": "^5.5.0", @@ -114,6 +115,26 @@ "fast-uri": "^3.0.0" } }, + "node_modules/@fastify/cors": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/@fastify/cors/-/cors-11.1.0.tgz", + "integrity": "sha512-sUw8ed8wP2SouWZTIbA7V2OQtMNpLj2W6qJOYhNdcmINTu6gsxVYXjQiM9mdi8UUDlcoDDJ/W2syPo1WB2QjYA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/fastify" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fastify" + } + ], + "license": "MIT", + "dependencies": { + "fastify-plugin": "^5.0.0", + "toad-cache": "^3.7.0" + } + }, "node_modules/@fastify/error": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/@fastify/error/-/error-4.2.0.tgz", @@ -711,6 +732,12 @@ "toad-cache": "^3.7.0" } }, + "node_modules/fastify-plugin": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/fastify-plugin/-/fastify-plugin-5.0.1.tgz", + "integrity": "sha512-HCxs+YnRaWzCl+cWRYFnHmeRFyR5GVnJTAaCJQiYzQSDwK9MgJdyAsuL3nh0EWRCYMgQ5MeziymvmAhUHYHDUQ==", + "license": "MIT" + }, "node_modules/fastq": { "version": "1.19.1", "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.19.1.tgz", diff --git a/services/rssapp/package.json b/services/rssapp/package.json index 4853b07..e57d2b6 100644 --- a/services/rssapp/package.json +++ b/services/rssapp/package.json @@ -1,6 +1,6 @@ { "name": "rssapp", - "version": "69.0.1", + "version": "69.1.0", "description": "", "main": "index.js", "type": "module", @@ -12,6 +12,7 @@ "license": "Unlicense", "dependencies": { "@dotenvx/dotenvx": "^1.49.0", + "@fastify/cors": "^11.1.0", "@isaacs/ttlcache": "^1.4.1", "apify-client": "^2.15.1", "fastify": "^5.5.0",