﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
32883	CORS issue with flutter web and django!	Akshat Tamrakar	nobody	"Sending request to django-rest-framework api from flutter web always results in CORS error sppecifically this Access to XMLHttpRequest at 'http://127.0.0.1:8000/' from origin 'http://localhost:62570' has been blocked by CORS policy: Request header field access-control-allow-origin is not allowed by Access-Control-Allow-Headers in preflight response.

In flutter: Tried putting ever possible header in request headers, not working!
In django: Tried making ALLOWED_HOSTS = ['*'] & adding corsheaders at top of middleware list and doing CORS_ALLOW_ALL_ORIGINS = True. Still got the same CORS error. Changing port no of gjango or even flutter doesn't make any change.

This same API is working successfully with react and angular (giving correct response).
There is no issue in flutter framework as it is working fine and getting correct response with other similar API developed using NestJS and dotNet.

I have also opened the issue in stackoverflow

Checklist
 Raised initially as discussion #...
 This cannot be dealt with as a third party library. (We prefer new functionality to be in the form of third party libraries where possible.)
 I have reduced the issue to the simplest possible case."	Bug	closed	HTTP handling	3.1	Normal	invalid	CORS , flutter , django_rest_framework , flutter_web ,  response , request , rest api , json	akshatt004.at@… Akshat Tamrakar	Unreviewed	0	1	0	0	0	0
