Django cors-headers

I added ```localhost`` to cors-headers allowed origins.

CORS_ALLOWED_ORIGINS = [
    "http://localhost:8080",
]

but the browser console gives me:

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://127.0.0.1:8000/api/rooms/.

I am using vuejs as a front-end library.

http://localhost:8080 is not treated the same as http://127.0.0.1:8000/. Try changing to use the latter.

how I am supposed to add my domain in production?

See the docs at django-cors-headers ยท PyPI, there are examples on that page showing how you can list multiple domains for that setting.

Is there are other ways to implement this?

What specifically are you trying to achieve?

Allow one domain name to access my API URLs.