Srisainath Jilakara
Srisainath Jilakara

Reputation: 221

When trying set corsheaders in settings.py file

(corsheaders.E014) Origin 'http://localhost:4200/' in CORS_ORIGIN_WHITELIST should not have path .Im getting this error.

CORS_ORIGIN_WHITELIST = ( 'http://localhost:4200/', )

Origin 'http://localhost:4200/' in CORS_ORIGIN_WHITELIST should not have path .Im getting this error.

Upvotes: 21

Views: 17830

Answers (1)

Vemka
Vemka

Reputation: 711

Remove the slash (/) from the end of the line (after the number 4200), leaving it as:

CORS_ORIGIN_WHITELIST = ( 'http://localhost:4200', )

That should make it work.

Upvotes: 71

Related Questions