The target origin provided () does not match the recipient window’s origin ()

Written by James McDonald

February 3, 2017

This error running cakephp 3 behind a nginx proxy on port 80 and proxying back to a docker container published on port 8080. Got this error message when clicking on the DebugKit toolbar

toolbar-app.js:31 Failed to execute ‘postMessage’ on ‘DOMWindow’: The target origin provided (‘http://php-docker.local:8080’) does not match the recipient window’s origin (‘http://php-docker.local’).

The fix was to set the correct host header

server {

        listen 80;
        server_name php-docker.local;
        # add proxy_set_header
        proxy_set_header Host $host;

        location / {
                proxy_pass http://php-docker.local:8080/;
        }

}

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

The reCAPTCHA verification period has expired. Please reload the page.

You May Also Like…

Squarespace Image Export

To gain continued access to your Squarespace website images after cancelling your subscription you have several...

MySQL 8.x GRANT ALL STATEMENT

-- CREATE CREATE USER 'tgnrestoreuser'@'localhost' IDENTIFIED BY 'AppleSauceLoveBird2024'; GRANT ALL PRIVILEGES ON...

Exetel Opt-Out of CGNAT

If your port forwards and inbound and/or outbound site-to-site VPN's have failed when switching to Exetel due to their...