I think i got this going after adding a custom config: https://docs.opnsense.org/manual/how-tos/caddy.html#custom-configuration-files
Gonna leave this here for others who might get stuck as well.
Gonna leave this here for others who might get stuck as well.
Code Select
(cors) {
@cors_preflight method OPTIONS
@cors header Origin {args.0}
handle @cors_preflight {
header Access-Control-Allow-Origin "{args.0}"
header Access-Control-Allow-Methods "GET, POST, PUT, PATCH, DELETE"
header Access-Control-Allow-Headers "Content-Type, x-api-key"
header Access-Control-Max-Age "3600"
respond "" 204
}
handle @cors {
header Access-Control-Allow-Origin "{args.0}"
header Access-Control-Expose-Headers "Link"
}
}
[immich domain] {
handle /api* {
import cors [domain making the CORS call (homeassistant wallpanel)]
reverse_proxy [ip:port of immich]
}
handle {
reverse_proxy [ip:port of immich]
}
}