Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTTP-Error 403 in chrome and Safari using https connection #29

Closed
arfaram opened this issue Jul 18, 2014 · 5 comments
Closed

HTTP-Error 403 in chrome and Safari using https connection #29

arfaram opened this issue Jul 18, 2014 · 5 comments

Comments

@arfaram
Copy link

arfaram commented Jul 18, 2014

Hi,
i'm using the bundle with symfony2.3 over http everything works fine.
Using HTTPS connection in chrome or Safari i get 403 forbbiden access when i POST vaiable from a form. in FF , IE and Opera no error are reported.

@Seldaek
Copy link
Member

Seldaek commented Jul 19, 2014

Not sure what could cause this. Are you using a self-signed certificate perhaps that has not been accepted in chrome? Did you check in the dev tools to see if the preflight OPTIONS request is done at all and if yes why it failed?

@arfaram
Copy link
Author

arfaram commented Jul 21, 2014

no, i' m using a COMODO SSL Certificate. After Debugging i found that the $options array value is empty:
Array ( [allow_origin] => Array ( ) [allow_credentials] => [allow_headers] => Array ( ) [expose_headers] => Array ( ) [allow_methods] => Array ( ) [max_age] => 0 [hosts] => Array ( ) )
So that the checkOrigin Method will fail.
I m using a squid for SSL connection configured in external server. The backed Server is using apache only on port 80. The proxy forward all SSL requests (443) to webserver on port 80.

@Seldaek
Copy link
Member

Seldaek commented Jul 21, 2014

Well if it's all empty then there is no way it will reply successfully. Yet it works in FF/IE you say? This sounds wrong.

@JulienTant
Copy link

Same problem here. The strange thing is that in this line

        if (!$request->headers->has('Origin') || $request->headers->get('Origin') == $request->getSchemeAndHttpHost()) {

chrome have no Origin on a GET request, but have one in POST request. So we're going to the second part of the condition, and we can see that request->getSchemeAndHttpHost() doesn't return the https:// protocol. Really weird.

@stof
Copy link

stof commented Aug 20, 2014

@JulienTant have you configured the IP of your Squid as a trusted proxy ? See http://symfony.com/doc/current/cookbook/request/load_balancer_reverse_proxy.html

@Seldaek Seldaek closed this as completed Sep 9, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants