Skip to content

CORS fails for Pi-hole when using local IPv4 address #2429

@pq2

Description

@pq2

Steps To Reproduce

This is possibly an upstream bug, but since upgrading to Ubuntu 22.04 and reinstalling Pi-hole the following problem occurred to me. Requests that require CORS to the Pi-hole admin page (e.g. when I want to change settings) fail when using the local IPv4 address (192.168.178.22) with the following error message from the server:

Failed CORS: 192.168.178.22 vs 127.0.0.1, 127.0.0.1, pi.hole, localhost.

This is not a big problem for me, as I now simply use pi.hole:8094 instead of the IP address, which works fine. So somewhere the local IPv4 address would still have to be added to the addresses allowed for CORS.

Expected Result

The Pi-hole admin panel works just fine

Actual Result

Requests that require CORS fail (changing settings, loading the adlists, ...).

Screenshots, Videos, or Pastebins

No response

Additional Context

No response

Build Version

25.0.3.2

Environment

By using the scripts

Environment Details

Ubuntu 22.04.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions