And of course I get it to work minutes after posting. For those following, I modified @janstadt's code to the following (pretty sure the 4th line can be deleted):
Code Select
(cors) {
@cors_preflight method OPTIONS
@cors_get method GET
@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_get {
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-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]
}
}