vuetable-2-tutorial icon indicating copy to clipboard operation
vuetable-2-tutorial copied to clipboard

lesson 01 problems

Open itelmenko opened this issue 7 years ago • 2 comments

Hello!

I have error

XMLHttpRequest cannot load http://vuetable.ratiw.net/api/users?sort=&page=1&per_page=10. Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://vuetable.example.test' is therefore not allowed access.

How can I fix it?

One more question. Why we need jquery in this lesson?

itelmenko avatar May 09 '17 10:05 itelmenko

@itelmenko Sorry, the lesson hasn't been updated to Vuetable v1.6 yet. The reference to the sample API endpoint should be done via "https:" instead of just "http:". So, if you change the api-url to as follow it should work.

  <vuetable ref="vuetable"
    api-url="https://vuetable.ratiw.net/api/users"
  ></vuetable>

jQuery is needed for Semantic UI framework that uses in this tutorial.

ratiw avatar May 09 '17 11:05 ratiw

Thank you for you answer. But look like it is cross domain issue (it is for https also):

XMLHttpRequest cannot load https://vuetable.ratiw.net/api/users?sort=&page=1&per_page=10. Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://vuetable.example.test' is therefore not allowed access.

itelmenko avatar May 09 '17 11:05 itelmenko