Unable to Create Spectrum App with domain target

Hi All, I have been trying to create a spectrum application with a domain name target rather than IP, but I keep just getting “Invalid Origin IP or DNS record”, makes me think you cant do it… but I have no idea why you wouldn’t be able to? thanks in advance.
48 Replies
Laudian
Laudian2w ago
I have a Spectrum app with a hostname as its target, so it definitely works. How are you trying to create the app?
wuking
wukingOP2w ago
for example i want create spectrum app that point to this url https://api.supabase.co instead of ip address 42.146.23.12 for example @Laudian can you screenshot or screen recording how u create with url instead of ip address?
Laudian
Laudian2w ago
I created the app via the API. Give me a minute to turn on my pc. What I can tell you, the target needs to be a hostname, not a URL.
wuking
wukingOP2w ago
hostname? meaning i cant point spectrum to https://api.supabase.co? but pointing to supabase.co?
Laudian
Laudian2w ago
yes without the https:// and the trailing /
wuking
wukingOP2w ago
how about subdomain? api.supabase.co like this?
Laudian
Laudian2w ago
you can point it to
api.supabase.co
api.supabase.co
wuking
wukingOP2w ago
what application type i should choose?
Laudian
Laudian2w ago
You still point it towards an API address. But instead of entering the IP directly, Cloudflare will regularly check the IP for api.supabase.co and update it automatically. That depends on what type of application you're trying to create^^
wuking
wukingOP2w ago
but the api.supabase.co is proxied thru cloudflare alr so when adding it, it throw Invalid Origin IP or DNS record I dont have the real ip of api.supabase.co(for instance an express http server) , its third party vendor provide to us
Laudian
Laudian2w ago
I haven't tried that, but I don't think that would work. The name needs to resolve to the server IP. But that doesn't make sense - why are you trying to create a Spectrum app to an external API?
wuking
wukingOP2w ago
to prevent ddos attacks, we use gcp cloud armor before, its works
Laudian
Laudian2w ago
But it's already proxied? Spectrum is for arbitrary TCP/UDP. For HTTPS, you just use the normal Cloudflare proxy?
wuking
wukingOP2w ago
because we tend to mask our vendor api to another proxy layer in under our domain
Laudian
Laudian2w ago
But you're still talking about http/https?
wuking
wukingOP2w ago
yes is there any other alternatives or solution for my requirements, probably spectrum is not the best for this? I want how it works like spectrum exactly, but not ip address but for url
Laudian
Laudian2w ago
I'm not sure what exactly you want Spectrum is like the https proxy, except that it allows you to use TCP/UDP applications IMAP for example, so you can proxy your mail server.
wuking
wukingOP2w ago
No description
wuking
wukingOP2w ago
i thought spectrum support http, https or other protocols as well, not only tcp/udp
Laudian
Laudian2w ago
It does, but I don't really understand WHY you're trying to use Spectrum for HTTP(S) from your explanation so far. Are you an Enterprise customer? Because those are all Enterprise only features.
wuking
wukingOP2w ago
because the vendor using spectrum as well, they dont allow us add extra A record, and not providing us their server or lb ip address they just provide us their endpoint url, but my requirement is to mask our vendor endpoint under our domain, is that posible?
Laudian
Laudian2w ago
So, your vendor has an API api.supabase.co and you want to use that API for your customers, but give your customers a different name, like api.yourcompany.example?
wuking
wukingOP2w ago
yup kind of api.supabase.co is a cf spectrum url
Laudian
Laudian2w ago
I very much doubt it's using Spectrum. It's using normal proxy IPs.
wuking
wukingOP2w ago
api.supabase.co this is example url
Laudian
Laudian2w ago
ok
wuking
wukingOP2w ago
I have trial now, trying to get this work
Laudian
Laudian2w ago
I don't think Spectrum is the way to go. It really doesn't help you if the Origin isn't configured for the domain you intend to use with it.
Laudian
Laudian2w ago
Cloudflare Docs
Respond with another site · Cloudflare Workers docs
Respond to the Worker request with the response from another website (example.com in this example).
Laudian
Laudian2w ago
That's an option, or if you are on Enterprise, you can use Origin rules with Host header rewrite
wuking
wukingOP2w ago
wait, but I want to use my spectrum because it use the same spectrum ip and spectrum domain for our applications this seems just rewrite, but not giving or using my spectrum ip vendor1.myspectrum.co vendor2.myspectrum.co api.myspectrum.co and so on
Laudian
Laudian2w ago
If you have a static IP, you can use that.
wuking
wukingOP2w ago
yeap i got, how? when create spectrum app point to vendor spectrum url it will throw error Invalid Origin IP or DNS record
Laudian
Laudian2w ago
Yes, I don't think Spectrum is what you're looking for.
wuking
wukingOP2w ago
but how i reuse my spectrum static ip or domain for it?
Laudian
Laudian2w ago
I think you just want to create Custom Hostnames (Cloudflare for SaaS) with your static IP and then use Host header overwrite.
wuking
wukingOP2w ago
can help screenshot which part in cloudflare for this? easier looking for it
Laudian
Laudian2w ago
Cloudflare Docs
Cloudflare for SaaS · Cloudflare for Platforms docs
Cloudflare for SaaS allows you to extend the security and performance benefits of Cloudflare's network to your customers via their own custom or vanity domains.
wuking
wukingOP2w ago
thanks will take a look on this
Laudian
Laudian2w ago
But to clarify Your company is A You use an API from company B say, api.company-b.com do you want to create names like customer1.company-a.com, customer2.comapny-a.com etc? or api.customer1.com?
wuking
wukingOP2w ago
comapny-a.com
Laudian
Laudian2w ago
Then you don't need CF for SaaS just create proxied CNAME records and use Origin Rules for Host Header overwrite? Or the Worker I linked.
wuking
wukingOP2w ago
but how i point my spectrum ip to them?
Laudian
Laudian2w ago
Cloudflare Docs
About address maps · Cloudflare BYOIP docs
Address map is a data structure enabling customers with BYOIP prefixes or account-level static IPs to specify which IP addresses should be mapped to DNS records when they are proxied through Cloudflare.
wuking
wukingOP2w ago
in my though, my static ip is bind with spectrum, only app created in spectrum will be only way to use that static ip right?
Laudian
Laudian2w ago
https://dash.cloudflare.com/?to=/:account/ip-addresses/proxy-ips I think you should be able to use the IP there? Do you see any IPs there?
wuking
wukingOP2w ago
I get back to you probably tomorrow, gtg for a flight, by the way thanks for so much help.
Laudian
Laudian2w ago
cya Though, just to say it: I still think the Worker (maybe deployed as a Snippet if that is possible) is the way to go here.

Did you find this page helpful?