Wildcards (except top-level) are supported.
So “http://.." is not valid. In your case, "http//.loca.it” would be OK for your case.
PS on macOS (I’ve tested 23.3, 24.0 & 24.2 on macOS 13.1) denies ‘http’ requests with error " The resource could not be loaded because the App Transport Security policy requires the use of a secure connection.". It looks like PS/UXP issue. I will create a ticket for this issue.
Please use ‘https’ & “domains”: [“http://*.loca.lt”] as a workaround.