2 years 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
2 years 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
2 years ago
have you verified that the cors headers are being set?
2 years ago
check the headers returned
2 years ago
where can I see this error for myself
2 years ago
I'm sorry but that doesn't really answer my question
I do not understand. the header already has Access-Control-Allow-Origin property
2 years ago
^
2 years ago
it looks like you already run it on vercel?
2 years ago
yes
2 years ago
look at the image in the root post, that's vercel
2 years ago
and what do i do to see the cors error?
2 years ago
im sorry but thats outside of what id like to do
2 years 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
}
}'
2 years ago
there are no cors headers
2 years ago

2 years ago
right but thats irrelevant
that is weird, prefetch had header configured from the hono code, then why is it missing?
2 years ago
i dont know, you would need to consult their docs
2 years ago
curl does not care about cors, cors is for browsers
2 years ago
^
I don't know what is happening, but the file in that deployment works well without cors issue
2 years 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
2 years ago
because it worked then and your latest code broke something
2 years 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
2 years 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
2 years 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
2 years 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
2 years ago
i wish you the best of luck while you debug this issue with your app
2 years ago
what was the error?
2 years ago
strange, glad you found a fix



