Cors install #4351
-
Hi, i've had some issue with installing adonis/cors, it seems that i need to update adonis/core. My questions is : My package.json : {
"name": "awi-backend",
"version": "1.0.0",
"private": true,
"scripts": {
"dev": "node ace serve --watch",
"build": "node ace build --production",
"start": "node server.js",
"test": "node ace test",
"continuous_test": "node ace test --watch",
"lint": "eslint . --ext=.ts",
"format": "prettier --write .",
"migrate": "node ace migration:run",
"rollback": "node ace migration:rollback"
},
"eslintConfig": {
"extends": [
"plugin:adonis/typescriptApp",
"prettier"
],
"plugins": [
"prettier"
],
"rules": {
"prettier/prettier": [
"error"
]
}
},
"eslintIgnore": [
"build"
],
"prettier": {
"trailingComma": "es5",
"semi": false,
"singleQuote": true,
"useTabs": false,
"quoteProps": "consistent",
"bracketSpacing": true,
"arrowParens": "always",
"printWidth": 100
},
"devDependencies": {
"@adonisjs/assembler": "^5.9.6",
"@japa/preset-adonis": "^1.2.0",
"@japa/runner": "2.5.1",
"@types/proxy-addr": "^2.0.3",
"@types/source-map-support": "^0.5.10",
"adonis-preset-ts": "^2.1.0",
"eslint": "^8.56.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-adonis": "^2.1.1",
"eslint-plugin-prettier": "^5.0.1",
"pino-pretty": "^10.3.0",
"prettier": "^3.1.1",
"typescript": "~4.6",
"youch": "^3.3.3",
"youch-terminal": "^2.2.3"
},
"dependencies": {
"@adonisjs/auth": "^8.2.3",
"@adonisjs/core": "^5.8.0",
"@adonisjs/lucid": "^18.4.2",
"@adonisjs/repl": "^3.1.0",
"buffer-alloc": "^1.2.0",
"klona": "^2.0.6",
"luxon": "^3.4.4",
"pg": "^8.11.3",
"proxy-addr": "^2.0.7",
"reflect-metadata": "^0.2.1",
"source-map-support": "^0.5.21"
}
} |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hey @nicolas-goyon! 👋🏻
You don't have to install anything to have cors support. |
Beta Was this translation helpful? Give feedback.
-
I strugled for 2 hours... all for one little config, thanks ! |
Beta Was this translation helpful? Give feedback.
Hey @nicolas-goyon! 👋🏻
@adonis/cors
is for v6 only.You don't have to install anything to have cors support.
📚 https://v5-docs.adonisjs.com/guides/security/cors