Inside the vue app, i am using this method to call the data
const response = await fetch(
‘http://hdfc.localhost:8000/api/method/hdfc.hooks.test’,
{ headers: { ‘Access-Control-Allow-Origin’: true } }
)
// const data = await response.json()
console.log(response)
Using this in the Vue App to access a White-listed custom function in Hooks.py that returns the JSON data, It even works on localhost on the browser.
@frappe.whitelist()
def test():
return frappe.get_meta(“Test For Actions”)
But while fetching it within the Vue app, it shows 403 Forbidden Error…
Is there any way to fix this, currently my Vue app is stored inside the frappe custom app…