APIキーとユーザー名をヘッダーに設定しても、悪いCSRFエラーが発生しています

POSTリクエストを送信しようとしていますが、ヘッダーとコンテンツを設定しても、正しい結果が得られません。

export default async function postNewTopic(req, res) {

    axios.post(`url/posts.json?title=\"${req.query.title}\"\u0026raw=${req.query.content}\u0026category=1`, {

    headers: {

      "Api-Key":  token ,

      "Api-Username": {My key}

    }})

    .then(function (response) {

      res.json(response.data);

    })

    .catch(function (error) {

      const err = error?.response?.data || error;

      res.status(error.status ||  error.statusCode || +error.code || 500).json(err)

    })

}

そして、こちらが私のフロントエンドコードです。

const createTopic = () => {

    axios.post(`api/post-new?title=${title}\u0026raw=${content}\u0026category=1`, {

        headers: {

          "Authorization": 'Bearer' + "",

          "Api-Key":  token ,

          "Api-Username": ""

        }})

    .then(function (response) {

      res.json(response.data);

    })

    .catch(function (error) {

      const err = error?.response?.data || error;

      console.log(error.response.data)

    })

  }

APIキーはAPIキーとして、ユーザー名はユーザー名として使用してください。ユーザー名としてAPIキーを送信しているようですが。

いいえ、削除した例にのみ含まれていました。しかし、APIキーとAPIユーザー名を入力したので、gets関数は機能しています。