Parsing wildcard subdomain for twitter cards



We’ve been trying to get our twitter cards working for both Profiles & Subdomains.

Two problems so far

#1) Problem is profiles are wildcard subdomains

Example Profile: and I am unable to find a way to whitelist/parse it properly.

#2) Photos work but sometimes randomly we are getting
Error: Failed to get a proxied URL for the image.
Link Used: