new:1 Access to fetch at ‘http://localhost:5000/notes’ from origin ‘http://notesapp-v1.dicodingacademy.com’ has been blocked by CORS policy: The request client is not a secure context and the resource is in more-private address space
local
my code :
const Hapi = require("@hapi/hapi");
const routes = require("./routes");
const init = async () => {
const server = Hapi.server({
port: 5000,
host: "localhost",
routes: {
cors: {
origin: ["*"],
},
},
});
server.route(routes);
await server.start();
console.log(`running server in ${server.info.uri}`);
};
init();
i try using cors origin in hapi framework but not still work,