Question Locked

NodeJS, SSE & PHP-XAMPP

0 helpful
2 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Hello world,

i have a local XAMPP webserver. I want to update data of webuser by NodeJS SSE. I don't get my php script to be executed. Before I've done it by Ajax-Posts without node. Do I need Curl to bridge PHP & NodeJS? And/Or do I have to use credentials, because of my two sources XAMPP & NodeJS?

legend: [url] = https://drake-pc:3002/path/to/cellData.php

My errors:
Cross-Origin request blocked: The Same Origin Policy disallows reading the remote resource at [url]. reason: CORS-headline Access-Control-Allow-Origin missing. Statuscode: 200.
Firefox can't establish a connection to the server at [url].

code:

Info: client.js is not executed instantly by index.php, instead by login & POST-method.

Add: Once I use http, I get the error: Blocked loading mixed active content [url]

I hope someone can help me out, thanks in advance!

2 replies

by kees_b edited

Sorry, but your link doesn't work. "drake-pc" isn't a valid domain from outside your local network.

by mobsolutions22

There should be origin access between node js and cross-platform, which you use. You have to add that origin access to finish your task correctly.

This discussion is closed to new replies.