Compare commits

...

2 Commits
0.1.3 ... 0.1.4

Author SHA1 Message Date
Nicolai Ort 86f4cd00ea 🚀RELEASE 0.1.4
continuous-integration/drone/push Build is passing Details
2021-08-14 14:19:30 +02:00
Nicolai Ort 518aa3eb08
Added cors 2021-08-14 14:19:08 +02:00
4 changed files with 27 additions and 1 deletions

View File

@ -2,9 +2,16 @@
All notable changes to this project will be documented in this file. Dates are displayed in UTC. All notable changes to this project will be documented in this file. Dates are displayed in UTC.
#### [0.1.4](https://git.odit.services/kauft.es/linkylinky/compare/0.1.3...0.1.4)
- Added cors [`518aa3e`](https://git.odit.services/kauft.es/linkylinky/commit/518aa3eb08cb72854812130d45b3b89afb074693)
#### [0.1.3](https://git.odit.services/kauft.es/linkylinky/compare/0.1.2...0.1.3) #### [0.1.3](https://git.odit.services/kauft.es/linkylinky/compare/0.1.2...0.1.3)
> 14 August 2021
- Weired knex env fix [`fef7daa`](https://git.odit.services/kauft.es/linkylinky/commit/fef7daaf961e9112aa00f2ad22c3b0518ad258a7) - Weired knex env fix [`fef7daa`](https://git.odit.services/kauft.es/linkylinky/commit/fef7daaf961e9112aa00f2ad22c3b0518ad258a7)
- 🚀RELEASE 0.1.3 [`86985ef`](https://git.odit.services/kauft.es/linkylinky/commit/86985ef7355c2db09dcd6c8e52ee7ebde3ed4128)
#### [0.1.2](https://git.odit.services/kauft.es/linkylinky/compare/0.1.1...0.1.2) #### [0.1.2](https://git.odit.services/kauft.es/linkylinky/compare/0.1.1...0.1.2)

View File

@ -1,6 +1,6 @@
{ {
"name": "@odit/shortener-backend", "name": "@odit/shortener-backend",
"version": "0.1.3", "version": "0.1.4",
"main": "index.js", "main": "index.js",
"license": "MIT", "license": "MIT",
"private": false, "private": false,
@ -15,6 +15,7 @@
"dotenv": "^10.0.0", "dotenv": "^10.0.0",
"fastify": "^3.20.1", "fastify": "^3.20.1",
"fastify-basic-auth": "^2.1.0", "fastify-basic-auth": "^2.1.0",
"fastify-cors": "^6.0.2",
"knex": "^0.21.21", "knex": "^0.21.21",
"sqlite3": "^5.0.2", "sqlite3": "^5.0.2",
"uniqid": "^5.3.0" "uniqid": "^5.3.0"

View File

@ -21,6 +21,11 @@ const knex = require('knex')(knexConfiguration);
const authenticate = { realm: 'Short' } const authenticate = { realm: 'Short' }
fastify.register(require('fastify-basic-auth'), { validate, authenticate }); fastify.register(require('fastify-basic-auth'), { validate, authenticate });
fastify.register(require('fastify-cors'), {
origin: true,
preflight: true,
preflightContinue: true
})
//Automagic Amazn redirects on /a/ //Automagic Amazn redirects on /a/
fastify.get('/a/:id', async (req, res) => { fastify.get('/a/:id', async (req, res) => {

View File

@ -1249,6 +1249,14 @@ fastify-basic-auth@^2.1.0:
fastify-plugin "^3.0.0" fastify-plugin "^3.0.0"
http-errors "^1.7.3" http-errors "^1.7.3"
fastify-cors@^6.0.2:
version "6.0.2"
resolved "https://registry.yarnpkg.com/fastify-cors/-/fastify-cors-6.0.2.tgz#4fd5102549659e9b34d252fd7ee607b63d021390"
integrity sha512-sE0AOyzmj5hLLRRVgenjA6G2iOGX35/1S3QGYB9rr9TXelMZB3lFrXy4CzwYVOMiujJeMiLgO4J7eRm8sQSv8Q==
dependencies:
fastify-plugin "^3.0.0"
vary "^1.1.2"
fastify-error@^0.3.0: fastify-error@^0.3.0:
version "0.3.1" version "0.3.1"
resolved "https://registry.yarnpkg.com/fastify-error/-/fastify-error-0.3.1.tgz#8eb993e15e3cf57f0357fc452af9290f1c1278d2" resolved "https://registry.yarnpkg.com/fastify-error/-/fastify-error-0.3.1.tgz#8eb993e15e3cf57f0357fc452af9290f1c1278d2"
@ -4014,6 +4022,11 @@ v8flags@^3.2.0:
dependencies: dependencies:
homedir-polyfill "^1.0.1" homedir-polyfill "^1.0.1"
vary@^1.1.2:
version "1.1.2"
resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc"
integrity sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=
verror@1.10.0: verror@1.10.0:
version "1.10.0" version "1.10.0"
resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400" resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400"