Can't delete silences from Karma on HTTPS

This issue has been tracked since 2021-12-24.

Hi all, I'm using Karma v0.93-79-ga2e1f78 with HTTPS on both Karma and Alertmanager. It works fine until I try to delete a silence.

The errors I get in browser console look like that:

Access to fetch at 'https://<my_prom_host>:9093/api/v2/silence/54b5d366-cf98-4ef9-9f07-39ef6378b3d6' from origin 'https://<my_karma_host>' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
useFetchDelete.ts:31 DELETE https://<my_prom_host>:9093/api/v2/silence/54b5d366-cf98-4ef9-9f07-39ef6378b3d6 net::ERR_FAILED

Karma's config looks like this:

  port: <karma_port>
    cert: "<cert_path>"
    key:  "<key_path>"
  - name: <my_prom_host>
    uri: "https://<my_prom_host>:9093"
      credentials: "omit"

I've tried adding headers from the config, and using nginx for reverse proxy at Karma's side with proper headers, yet all of that gives me CORS error on DELETE request.

What could be the problem?

prymitive wrote this answer on 2021-12-27

See #715, either ensure your alertmanager sets correct CORS headers or enable proxy in karma config

More Details About Repo
Owner Name prymitive
Repo Name karma
Full Name prymitive/karma
Language TypeScript
Created Date 2018-09-09
Updated Date 2023-03-17
Star Count 1921
Watcher Count 33
Fork Count 166
Issue Count 2


Issue Title Created Date Updated Date