a year ago
I set up hono backend with cors setitng to allow all origin, but somehow when I accessed the server with the domain set, it keeps returning cors error with 200 response.
90 Replies
a year ago
send the domain in question please
I set with railway, and other project such as 4c028fe8-0273-420a-84cc-be5ea253616c works fine without extra configuration
a year ago
have you verified that the cors headers are being set?
a year ago
check the headers returned
a year ago
where can I see this error for myself
I run a web app in localhost
a year ago
I'm sorry but that doesn't really answer my question
I recently switched the server url to be this test-cors.standardweb3.com
I do not understand. the header already has Access-Control-Allow-Origin property
a year ago
^
a year ago
it looks like you already run it on vercel?
a year ago
yes
no, this error is from localhost
a year ago
look at the image in the root post, that's vercel
a year ago
and what do i do to see the cors error?
a year ago
im sorry but thats outside of what id like to do
a year ago
i need an easy way to see the cors error for myself
curl -X POST https://test-cors.standardweb3.com/graphql \
-H "Content-Type: application/json" \
-d '{"query": "{ hello }"}'
curl -X POST https://test-cors.standardweb3.com \
-H "Content-Type: application/json" \
-d '{
"query": "query GetTradeHistorysCursor($maker: String!, $after: String, $limit: Int) { account(id: $maker) { totalTradeHistory tradeHistory(orderBy: \"timestamp\", orderDirection: \"desc\", after: $after, limit: $limit) { pageInfo { startCursor hasPreviousPage hasNextPage endCursor } } } }",
"variables": {
"maker": "0xF8FB4672170607C95663f4Cc674dDb1386b7CfE0",
"limit": 10
}
}'
a year ago
there are no cors headers
a year ago

a year ago
right but thats irrelevant
that is weird, prefetch had header configured from the hono code, then why is it missing?
a year ago
i dont know, you would need to consult their docs
a year ago
curl does not care about cors, cors is for browsers
a year ago
^
I don't know what is happening, but the file in that deployment works well without cors issue
a year ago
this is an application level issue
if this is an application level issue, why is cors working in the current rollback deployment of 4c028fe8-0273-420a-84cc-be5ea253616c
a year ago
because it worked then and your latest code broke something
a year ago
either way, this is not a platform issue
I disagree, all the working code is same with branch from main in the github standard-ponder repo
a year ago
if we broke cors for our users applications we would be seeing hundreds of reports pour in
this project also uses the same code from the main branch of the github repo standard-ponder
a year ago
I'm sorry but this is an application level issue
ok but I don't really understand why only the recent deployment with the same code is causing a problem
a year ago
to be honest, I don't either, I don't know enough about your code to tell you the issue unfortunately, but that doesn't change my previous statement
a year ago
i wish you the best of luck while you debug this issue with your app
a year ago
what was the error?
a year ago
strange, glad you found a fix



