Похожие чаты

TLDR : i'm building a third party api and i

want to be sure when a request comes from a domain(client side of that domain) , the request is actually from that domain and not faked.

hello , in systems like google ad sense in which the scenario is an advertisor registers an "ad" and people can come and register their applications or websites so they can load the appropriate "ad" and earn some money.
typically an api key is given to the app owner so they can use it in their application , i'm building a similar system to google ads in which people use my api to load some stuff in their application. but the thing is , api key will be used in "client side" meaning in browser of users of the "app owner's application". so it can be easily leaked or even worse , the app owner itself spam the api key with a script or something.
so in my server , when a request comes , how can i make sure that this request is coming from domain "example.com" that is registered in my database and that api key was built for ? as far as i know i can't just rely on http headers since they can easily be manipulated !
at first i thought tls takes care of but gpt said otherwise

4 ответов

34 просмотра

fixed IP address?

mohammad- Автор вопроса
Roman Sharkov
fixed IP address?

nope , since the api key will be used in browser (users of my customers) , the ip will vary

mohammad
nope , since the api key will be used in browser (...

then it's not a "domain" the request is coming from. I thought your clients are servers of other people. But in that case - there's no way.

AdSense does not have a protection against the scenario you describe either, they just rely on the headers of clients, and clients can see AdSense API keys

Похожие вопросы

Обсуждают сегодня

Господа, а что сейчас вообще с рынком труда на делфи происходит? Какова ситуация?
Rꙮman Yankꙮvsky
29
А вообще, что может смущать в самой Julia - бы сказал, что нет единого стандартного подхода по многим моментам, поэтому многое выглядит как "хаки" и произвол. Короче говоря, с...
Viktor G.
2
@Benzenoid can you tell me the easiest, and safest way to bu.y HEX now?
Živa Žena
20
This is a question from my wife who make a fortune with memes 😂😂 About the Migration and Tokens: 1. How will the old tokens be migrated to the new $LGCYX network? What is th...
🍿 °anton°
2
30500 за редактор? )
Владимир
47
а через ESC-код ?
Alexey Kulakov
29
What is the Dex situation? Agora team started with the Pnetwork for their dex which helped them both with integration. It’s completed but as you can see from the Pnetwork ann...
Ben
1
Гайс, вопрос для разносторонее развитых: читаю стрим с юарта, нада выделять с него фреймы с определенной структурой, если ли чо готовое, или долбаться с ринг буффером? нада у...
Vitaly
9
Anyone knows where there are some instructions or discort about failed bridge transactions ?
Jochem
21
@lozuk how do I get my phex copies of my ehex from a atomic wallet, to move to my rabby?
Justfrontin 👀
11
Карта сайта