-
-
Notifications
You must be signed in to change notification settings - Fork 167
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cors help? #29
Comments
You might need to proxy the odoo endpoint. Check this stackoverflow problem: https://stackoverflow.com/questions/57969766/not-able-to-set-proxy-port-in-my-vue-js-app |
Did you solve the method not allowed? |
I have the same problem, is there any solution ?, I already add cors = "*" to the controller but it doesn't work |
I Added nginx proxy front of odoo. Thats the solution. |
Could can share it please. @pumppi |
Example code for docker nginx template. Nginx is front of odoo docker instance. `events { worker_connections 1024; } http { client_max_body_size 500M; #All the other odoo requests } log_format upstreamlog '[$time_local] $remote_addr - $remote_user - $server_name to: $upstream_addr: $request upstream_response_time $upstream_response_time msec $msec request_time $request_time'; server {
} |
http://localhost:8069/api/project.budget/ 405 (METHOD NOT ALLOWED)
Access to XMLHttpRequest at 'http://localhost:8069/api/project.budget/' from origin 'http://localhost:3000' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.
I've made a vue app but when I want to create of records I got cors error
createProject() { const endpoint = 'http://localhost:8069/api/project.budget/' axios .post(endpoint, this.project, { headers: { session_id: '7951526a5f73527a5c1a7f4e21166d3844c3ddfc' } }) .then((response) => { console.log(response) }) }
The text was updated successfully, but these errors were encountered: