-
-
Notifications
You must be signed in to change notification settings - Fork 209
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
DELETE endpoints do not include ‘Access-Control-Allow-Origin’ in the header which causes web browsers to report a CORS error #2261
Comments
i know that additional headers can be included but i don't understand what causes the DELETE to fail when not hosted on Pi-hole device and all the other requests are successful |
these are included in the response of every other endpoint that's not a DELETE endpoint from what i can see. |
Is it? From another machine:
On the Pi-hole itself:
I don't see |
I am undecided concerning the |
Versions
Core
Version is v6.0.4-1-ga7e414ac (Latest: null)
Branch is development
Hash is a7e414a (Latest: a7e414a)
Web
Version is v6.0.1-10-gec8beaf5 (Latest: null)
Branch is development
Hash is ec8beaf5 (Latest: ec8beaf5)
FTL
Version is vDev-39a852e (Latest: null)
Branch is development
Hash is 39a852e (Latest: 39a852e)
Platform
Expected behavior
Access-Control-Allow-Origin: * to be in the header like it is with other endpoints
Actual behavior / bug
Access-Control-Allow-Origin: * is missing and seems to cause Firefox and Chrome to report a CORS error
Steps to reproduce
Steps to reproduce the behavior:
https://gist.github.com/mwoolweaver/f5fe7a58f38cfe68e05b7b5e491e65fc
simple website to allow quickly disabling pihole via bookmark
download the file locally (not on Pi-hole)
Open in firefox or chrome and fill in the boxes with relevant info and open the inspector before clicking submit
click submit and watch the DELETE request show a CORS error
now host that same file on the Pi-hole device, repeat steps 2 & 3
now you will see the 204 response that's expected without the CORS error
Debug Token
Screenshots
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: