TEMP: CORS issue fix
Signed-off-by: Naval <ashish.kumar@cloudwick.com>
This commit is contained in:
parent
6b6a64e5cf
commit
3489b75ec2
|
@ -36,7 +36,7 @@ export function PhoneNumberList() {
|
|||
const fetchNumberList = async () => {
|
||||
try {
|
||||
const myHeaders = new Headers({
|
||||
"Origin": window.location.origin,
|
||||
"Origin": "*",
|
||||
"x-requested-with": "XMLHttpRequest"
|
||||
});
|
||||
|
||||
|
@ -45,9 +45,10 @@ export function PhoneNumberList() {
|
|||
headers: myHeaders
|
||||
};
|
||||
|
||||
const corsProxy = "https://cors-anywhere.herokuapp.com/";
|
||||
const apiUrl = "https://api.sms-activate.ae/stubs/handler_api.php?api_key=eA103094961490b3350620b1bdd57244&action=getActiveActivations";
|
||||
const response = await fetch(corsProxy + apiUrl, requestOptions)
|
||||
// const corsProxy = "https://cors-anywhere.herokuapp.com/";
|
||||
// const apiUrl = "https://api.sms-activate.ae/stubs/handler_api.php?api_key=eA103094961490b3350620b1bdd57244&action=getActiveActivations";
|
||||
// const response = await fetch(corsProxy + apiUrl, requestOptions)
|
||||
const response= await fetch("https://ikmbnngahzcellthaysf.supabase.co/functions/v1/call-sms-gateway", requestOptions)
|
||||
const data = await response.json()
|
||||
console.log(data)
|
||||
setNumberList(data?.activeActivations || [])
|
||||
|
|
Loading…
Reference in a new issue