CORS API calls not working with SPDY enabled in chrome
See original GitHub issueI am using axios for my reactjs project. The backend server for API is hosted on nginx over ssl and has spdy protocol enabled. Does it work with alternate protocols like SPDY?
Chrome is blocking the request with the following error
bundle.js:55816 OPTIONS https://axz.in/abc/token net::ERR_SPDY_PROTOCOL_ERROR
Chrome Debug Log as below
t=8819 [st= 0] +REQUEST_ALIVE [dt=120]
t=8819 [st= 0] +URL_REQUEST_DELEGATE [dt=2]
t=8819 [st= 0] DELEGATE_INFO [dt=1]
--> delegate_info = "extension Adblock Plus"
t=8820 [st= 1] DELEGATE_INFO [dt=1]
--> delegate_info = "extension AdBlock"
t=8821 [st= 2] -URL_REQUEST_DELEGATE
t=8821 [st= 2] +URL_REQUEST_START_JOB [dt=117]
--> load_flags = 34626 (BYPASS_CACHE | DO_NOT_SAVE_COOKIES | DO_NOT_SEND_AUTH_DATA | DO_NOT_SEND_COOKIES | MAYBE_USER_GESTURE | VERIFY_EV_CERT)
--> method = "OPTIONS"
--> priority = "LOW"
--> url = "https://axz.in/abc/token"
t=8821 [st= 2] URL_REQUEST_DELEGATE [dt=0]
t=8821 [st= 2] HTTP_CACHE_GET_BACKEND [dt=0]
t=8821 [st= 2] URL_REQUEST_DELEGATE [dt=0]
t=8821 [st= 2] +HTTP_STREAM_REQUEST [dt=0]
t=8821 [st= 2] HTTP_STREAM_REQUEST_STARTED_JOB
--> source_dependency = 474195 (HTTP_STREAM_JOB)
t=8821 [st= 2] HTTP_STREAM_REQUEST_BOUND_TO_JOB
--> source_dependency = 474195 (HTTP_STREAM_JOB)
t=8821 [st= 2] -HTTP_STREAM_REQUEST
t=8821 [st= 2] +HTTP_TRANSACTION_SEND_REQUEST [dt=1]
t=8822 [st= 3] HTTP_TRANSACTION_HTTP2_SEND_REQUEST_HEADERS
--> :host: ayz.in
:method: OPTIONS
:path: /abc/token
:scheme: https
:version: HTTP/1.1
accept: */*
accept-encoding: gzip, deflate, sdch
accept-language: en-US,en;q=0.8
access-control-request-headers: accept, authorization, content-type
access-control-request-method: POST
cache-control: no-cache
origin: http://localhost:8000
pragma: no-cache
referer: http://localhost:8000/
user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.102 Safari/537.36
t=8822 [st= 3] -HTTP_TRANSACTION_SEND_REQUEST
t=8822 [st= 3] HTTP_TRANSACTION_READ_HEADERS [dt=116]
--> net_error = -337 (ERR_SPDY_PROTOCOL_ERROR)
t=8938 [st=119] -URL_REQUEST_START_JOB
--> net_error = -337 (ERR_SPDY_PROTOCOL_ERROR)
t=8938 [st=119] URL_REQUEST_DELEGATE [dt=0]
t=8939 [st=120] -REQUEST_ALIVE
--> net_error = -337 (ERR_SPDY_PROTOCOL_ERROR)
Issue Analytics
- State:
- Created 7 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
CORS not working on Chrome - Stack Overflow
It seems to be making the request, but without any of the headers you'd expect. If the URL is from the same origin,...
Read more >Troubleshoot CORS errors from API Gateway - AWS
To resolve a CORS error from an API Gateway REST API or HTTP API, you must reconfigure the API to meet the CORS...
Read more >I started getting CORS errors after upgrading to v76.
I'm developing a web app that makes web service requests via Axios to an endpoint on one of our development servers. The requests...
Read more >live-server - npm
Start using live-server in your project by running `npm i live-server`. ... Enables CORS for any origin (reflects request origin, requests ...
Read more >Firefox CORS - missing "user-agent" in response header ...
I guess the problem is that the response from Moralis API is missing ... On Chrome/Brave it works correctly, but on Firefox I...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @rajchourasia To make sure it’s not a CORS related issue, maybe try opening your website with Chrome with these flags: “–disable-web-security --user-data-dir”. If with this you get it working fine, then you have a problem with CORS 😃
Did anyone got some solution… I’m badly stuck in same issue