Checkout ui extension Failed With Shopify Document Guide

Using App Remix code failed. It will return OPTIONS 204 and GET 401. The code I use is the same like in app remix document

import { json } from "@remix-run/node";
import { authenticate } from "../shopify.server";

export const loader = async ({ request }) => {
  const { sessionToken, cors } = await authenticate.public.checkout(
    request
  );
    return cors(json({
        point: 500,
        covert_rate: 10,
    }));
};

Unsure if anyone be able to use public.checkout() successfully. It will return CORS Missing Allow.

If I setup CORS normally without using shopify public validate it will work. But is there anyway to use shopify app remix code?