0

I'm currently participating in the Solana boot camp available on YouTube: Boot Camp Video at the timestamp 2:03:27 / 11:08:04.

I'm not seeing any results in Dial.to and suspect it might be related to a CORS error. Here’s the relevant portion of my api/vote/route.ts file:

import { ActionGetResponse, ACTIONS_CORS_HEADERS } from '@solana/actions';

export async function GET(request: Request) {
  const actionMetadata: ActionGetResponse = {
    icon: "https://upload.wikimedia.org/wikipedia/commons/6/6a/JavaScript-logo.png",
    title: "Vote For Your Favorite type of Peanut Butter",
    description: "Vote between chrunchy and smooth peanut butter",
    label: "vote",
  };
  return Response.json(actionMetadata, { headers: ACTIONS_CORS_HEADERS });
}

Please refer to the attached screenshot for the error message:Error Message Screenshot

1 Answer 1

1

You can try turning off SHIELD if using Brave Browser Brave Shield Screenshot

Or use Firefox - that should resolve the issue.

If using Chrome - You can also try setting this flag;

chrome://flags/#allow-insecure-localhost

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.