CORS request across different ports did not succeed on Firefox but works on Chrome
Asked Answered
C

1

19

I'm making CORS requests from https://169.254.128.2:8443 to APIs served on https://169.254.128.2:8444 by lighttpd server. Lighttpd has CORS enabled with the following response headers but the OPTIONS request does not go through on Firefox.

setenv.add-response-header = (
    "Access-Control-Allow-Origin" => "*" (tried https://169.254.128.2:8443 too),
    "Access-Control-Allow-Headers" => "accept, origin, x-requested-with, content-type, x-transmission-session-id, x-ida-auth-token, content-disposition",
    "Access-Control-Expose-Headers" => "X-Transmission-Session-Id",
    "Access-Control-Allow-Methods" => "GET, POST, OPTIONS, PUT"
    )

I get the error: MOZILLA_PKIX_ERROR_SELF_SIGNED_CERT. I'd like to know if there is a way to communicate with 8444 other than explicitly accepting the certificate for 8444. I already accept the certificate for 8443 when I first access the url https://169.254.128.2:8443 and 8444 and 8443 use the same certificates. The requests go through fine on both Chrome and Safari without accepting certificates.

Crispy answered 13/8, 2018 at 23:1 Comment(0)
I
31

This is a Firefox bug: https://bugzilla.mozilla.org/show_bug.cgi?id=700837

You must enable the certificate on each port individually.

Open the url in Firefox and accept the certificates for https://169.254.128.2:8443 and https://169.254.128.2:8444

Ichinomiya answered 26/10, 2018 at 14:44 Comment(2)
OMG! Thank you Jesus.Creamery
Thank you so much, after so many years, this just delivered me from some pain after about an hour of debugging.Sporophyll

© 2022 - 2024 — McMap. All rights reserved.