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
I have a Spectrum app with a hostname as its target, so it definitely works. How are you trying to create the app?
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?
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.
yes
without the https:// and the trailing /
how about subdomain?
api.supabase.co like this?
you can point it to
what application type i should choose?
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^^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
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?
to prevent ddos attacks, we use gcp cloud armor before, its works
But it's already proxied?
Spectrum is for arbitrary TCP/UDP. For HTTPS, you just use the normal Cloudflare proxy?
because we tend to mask our vendor api to another proxy layer in under our domain
But you're still talking about http/https?
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
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.

i thought spectrum support http, https or other protocols as well, not only tcp/udp
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.
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?
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
?yup kind of api.supabase.co is a cf spectrum url
I very much doubt it's using Spectrum.
It's using normal proxy IPs.
api.supabase.co this is example url
ok
I have trial now, trying to get this work
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.
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).
That's an option, or if you are on Enterprise, you can use Origin rules with Host header rewrite
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
If you have a static IP, you can use that.
yeap i got, how?
when create spectrum app point to vendor spectrum url
it will throw error Invalid Origin IP or DNS record
Yes, I don't think Spectrum is what you're looking for.
but how i reuse my spectrum static ip or domain for it?
I think you just want to create Custom Hostnames (Cloudflare for SaaS) with your static IP and then use Host header overwrite.
can help screenshot which part in cloudflare for this?
easier looking for it
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.
thanks will take a look on this
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
?comapny-a.com
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.
but how i point my spectrum ip to them?
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.
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?
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?
I get back to you probably tomorrow, gtg for a flight,
by the way thanks for so much help.
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.