it looks like only the garbage does not use the cors proxy
extra info but i dont know if this is relevant.
i use 2 servers.
domotic run on server1 (fictief name)
dashticz on server2 (fictief name)
acces log
- Spoiler: show
- 10.10.20.243 - - [15/Nov/2020:08:53:11 +0000] "GET /domo/vendor/dashticz/garbage/index.php?service=recycleapp&street=**********r&sub=**********r&zipcode=*********&nr=******&t= HTTP/1.1" 500 209 "http://10.10.20.6/domo/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.183 Safari/537.36"
10.10.20.243 - - [15/Nov/2020:08:53:11 +0000] "GET /domo/vendor/dashticz/cors.php?http://json.tvgids.nl/v4/channels HTTP/1.1" 200 12784 "http://10.10.20.6/domo/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.183 Safari/537.36"
10.10.20.243 - - [15/Nov/2020:08:53:11 +0000] "GET /domo/vendor/dashticz/cors.php?http://api.9292.nl/0.1/locations/son-en ... lang=nl-NL HTTP/1.1" 200 8517 "http://10.10.20.6/domo/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.183 Safari/537.36"
10.10.20.243 - - [15/Nov/2020:08:53:11 +0000] "GET /domo/dist/assets/fonts/fa-solid-900.woff2 HTTP/1.1" 200 80437 "http://10.10.20.6/domo/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.183 Safari/537.36"
10.10.20.243 - - [15/Nov/2020:08:53:11 +0000] "GET /domo/vendor/dashticz/cors.php?http://json.tvgids.nl/v4/programs/?day= ... 5430389921 HTTP/1.1" 200 123593 "http://10.10.20.6/domo/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.183 Safari/537.36"
10.10.20.243 - - [15/Nov/2020:08:54:11 +0000] "GET /domo/vendor/dashticz/cors.php?http://api.9292.nl/0.1/locations/son-en ... lang=nl-NL HTTP/1.1" 200 8518 "http://10.10.20.6/domo/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.183 Safari/537.36"
error log
- Spoiler: show
-
[Sun Nov 15 08:53:11.354378 2020] [php7:error] [pid 319869] [client 10.10.20.243:6861] PHP Fatal error: Uncaught Error: Call to undefined function curl_init() in /var/www/web/domo/vendor/dashticz/garbage/index.php:284\nStack trace:\n#0 {main}\n thrown in /var/www/web/domo/vendor/dashticz/garbage/index.php on line 284, referer: http://10.10.20.6/domo/
did some testsingthat maybe can help
when i refresh my browser i notice this url.
h**p://10.10.20.6/domo/vendor/dashticz/garbage/index.php?service=recycleapp&street=********&sub=********&zipcode=*****&nr=**&t=
is see that it's use index.php and no cors.php
"GET /domo/vendor/dashticz/garbage/index.php?service=recycleapp&street=***********&sub=***********&zipcode=******&nr=***&t=
so i test it with this url myself in the browser and change index.php to cors.php
h**p://10.10.20.6/domo/vendor/dashticz/garbage/cors.php?service=recycleapp&street=*********&sub=**********&zipcode=*************&nr=*****&t=
i see this in my error log
[Sun Nov 15 09:22:45.167075 2020] [php7:error] [pid 320339] [client 10.10.20.243:10190] script '/var/www/web/domo/vendor/dashticz/garbage/cors.php' not found or unable to stat
indeed there is no cors.php in my garbage folder
So i copied the cors from dashticz to garbage
then i run the url again
i get a 200 on my get but no response (so far my knowledge of post and get)
- Spoiler: show
-
Request URL: http://10.10.20.6/domo/vendor/dashticz/ ... ***&t=
Request Method: GET
Status Code: 200 OK
Remote Address: 10.10.20.6:80
Referrer Policy: strict-origin-when-cross-origin
Access-Control-Allow-Origin: *
Cache-Control: no-store, no-cache, must-revalidate, max-age=0
Cache-Control: post-check=0, pre-check=0
Connection: Keep-Alive
Content-Length: 0
Content-Type: text/html; charset=UTF-8
Date: Sun, 15 Nov 2020 09:26:00 GMT
Keep-Alive: timeout=5, max=100
Pragma: no-cache
Server: Apache/2.4.41 (Ubuntu)
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.9
Cache-Control: max-age=0
Connection: keep-alive
Host: 10.10.20.6
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.183 Safari/537.36
service: recycleapp
amp;street: *******
amp;sub: ********
amp;zipcode: *******
amp;nr: *
amp;t:
is see this error in my error.log
- Spoiler: show
-
[Sun Nov 15 09:31:30.283779 2020] [php7:warn] [pid 305762] [client 10.10.20.243:11125] PHP Warning: file_get_contents(service=recycleapp&street=********&sub=******&zipcode=******&nr=*****&t=): failed to open stream: No such file or directory in /var/www/web/domo/vendor/dashticz/garbage/cors.php on line 28
[Sun Nov 15 09:31:30.283862 2020] [php7:notice] [pid 305762] [client 10.10.20.243:11125] PHP Notice: Undefined variable: http_response_header in /var/www/web/domo/vendor/dashticz/garbage/cors.php on line 29
[Sun Nov 15 09:31:30.283875 2020] [php7:warn] [pid 305762] [client 10.10.20.243:11125] PHP Warning: Invalid argument supplied for foreach() in /var/www/web/domo/vendor/dashticz/garbage/cors.php on line 5
may this will help