Skip to content

Issues with CORS #1273

Closed Answered by ra0x3
chlenc asked this question in Q&A
Aug 13, 2023 · 11 comments
Discussion options

You must be logged in to vote

@chlenc

  • We do have a bug, I've updated @deekerno's PR to allow for all headers and more methods

    • So this fixes things on our end
    • We will cut a patch release for you
  • Also, there are some issues in your React code

  • Below is a more simple version that includes proper headers

import React, { useEffect } from "react";
import logo from "./logo.svg";
import "./App.css";
import axios from "axios";

function App() {
  useEffect(() => {
    const response = axios.request({
      method: "POST",
      url: "https://spark-indexer.spark-defi.com/api/sql/swaygang/spark_indexer",
      headers: {
        "Content-Type": "application/json",
        Accept: "application/json",
      },
      data: {

Replies: 11 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by ra0x3
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants
Converted from issue

This discussion was converted from issue #1265 on August 15, 2023 15:07.