Skip to content
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

How to fix ping CORS issue with Docker? #775

Open
Tama47 opened this issue May 11, 2024 · 1 comment
Open

How to fix ping CORS issue with Docker? #775

Tama47 opened this issue May 11, 2024 · 1 comment

Comments

@Tama47
Copy link

Tama47 commented May 11, 2024

Referring to this:
https://github.com/bastienwirtz/homer/blob/main/docs/troubleshooting.md#my-custom-service-card-doesnt-work-nothing-appears-or-offline-status-is-displayed-pi-hole-sonarr-ping-

Modify the target server configuration so that the response of the server included following header- Access-Control-Allow-Origin: * (https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS#simple_requests). It might be an option in the targeted service, otherwise depending on how the service is hosted, the proxy or web server can seamlessly add it.

Use a cors proxy server like cors-container, cors-anywhere or many others.

Specifically would like to do option 2 or 3, as option 1 isn't feasible.

docker-compose:

version: "2"
services:
  homer:
    image: b4bz/homer
    container_name: Homer
    volumes:
      - ./assets:/www/assets
    environment:
      - INIT_ASSETS=1

config.yaml:

- name: "Pi-hole - Synology"
        logo: "assets/tools/Pi-hole.svg"
        subtitle: "192.168.1.10:8080"
        url: "http://pi.hole:80"
        target: "_blank"
        tag: "Tools"
        type: Ping
@fanuch
Copy link

fanuch commented May 19, 2024

https://github.com/pi-hole/docker-pi-hole?tab=readme-ov-file#advanced-variables
Look at value CORS_HOSTS

I believe that would solve for "option 2"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants