I am getting a strange error: vue-resource.common.js Uncaught TypeError: str.replace is not a function and it seems to be related to an ajax call I am making to fetch some data:
export default {
data: () => ({
recipes: []
}),
ready() {
this.$http.get('http://localhost:3000/recipes', {
headers: {
'Access-Control-Allow-Origin': true
}
}).then((recipes) => {
this.$set('recipes', recipes)
})
}
};
I am new to vue.js and really unsure how to debug this... any pointers would be fantastic.
Thanks so much.
headers: { 'Access-Control-Allow-Origin': '*' }insteadNo 'Access-Control-Allow-Origin' header is present on the requested resource.