Welcome! Log In Create A New Profile

Advanced

SPDY+CORS not working under Chrome

Paweł Smoliński
February 16, 2013 05:12AM
Hi,
I've following problem: we are running website with SPDY enabled (nginx
1.3.12 with SPDY patch 62 and OpenSSL 1.0.1e) where we are providing API
interface too. This API is used by other site (mobile interface) and in
order to have this whole thing working I've added following configuration
to nginx in order to have cross-origin requests working (found this
somewhere in the web):

if ($request_method = 'OPTIONS') {
add_header 'Access-Control-Allow-Origin' '*';

add_header 'Access-Control-Allow-Credentials' 'true';
add_header 'Access-Control-Allow-Methods' 'GET, POST, PUT, DELETE,
OPTIONS';

add_header 'Access-Control-Allow-Headers'
'DNT,X-Mx-ReqToken,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type';

add_header 'Access-Control-Max-Age' 1728000;
add_header 'Content-Type' 'text/plain charset=UTF-8';
add_header 'Content-Length' 0;

return 200;
}

The problem with that is Chrome browser is reporting that OPTIONS failed
when SPDY is enabled - when I turn off SPDY support everything is working
as expected.
Any idea how to workaround this (and maybe it's some bug inside Chrome)?
Cheers,
Paweł
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

SPDY+CORS not working under Chrome

Paweł Smoliński 1651 February 16, 2013 05:12AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 274
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready