Skip to content
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

Initial settings: disableHostCheck, Cross-Origin #46

Open
totobrei opened this issue Jan 16, 2020 · 1 comment
Open

Initial settings: disableHostCheck, Cross-Origin #46

totobrei opened this issue Jan 16, 2020 · 1 comment

Comments

@totobrei
Copy link

Hi, I appreciate your work!

When following the installation guide, it is not working out of the box. In
vue.config.js
I have to add

devServer: {
    disableHostCheck: true,
    ... 
}

to see the vue start page.

The web beowser console is repeatedly generating Cross-Origin blocks. So is some communication still bocked between vue and django by Cross-Origin rule of django or vue?
Am I doing something wrong or is it intended to be like this? Is djangos corsheaders needed to allow communication?

@gtalarico
Copy link
Owner

You shouldn't need that if you application calls the api through the dev proxy since it will be in the same domain. check what URL the blocked requests are hitting.

https://github.com/gtalarico/django-vue-template/blob/master/vue.config.js#L14

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants