mirror of
https://github.com/christianvidalwolf-prog/Craze-Data-check.git
synced 2026-08-03 15:45:24 +02:00
fix(fetch): change proxy to allorigins for more reliable dropbox access
This commit is contained in:
+2
-2
@@ -27,9 +27,9 @@ export default function App() {
|
|||||||
try {
|
try {
|
||||||
setIsLoadingDefault(true);
|
setIsLoadingDefault(true);
|
||||||
setDefaultLoadError(null);
|
setDefaultLoadError(null);
|
||||||
// Using corsproxy.io to avoid Dropbox CORS issues
|
// Using allorigins proxy to avoid Dropbox CORS issues and improve reliability
|
||||||
const dropboxUrl = 'https://dl.dropboxusercontent.com/scl/fi/nkyabkq2jdwfudof2ovrl/Data-Matrix.xlsx?rlkey=1cz5fuabwipqqivihii7sybw0&st=io0g4wvb&dl=1';
|
const dropboxUrl = 'https://dl.dropboxusercontent.com/scl/fi/nkyabkq2jdwfudof2ovrl/Data-Matrix.xlsx?rlkey=1cz5fuabwipqqivihii7sybw0&st=io0g4wvb&dl=1';
|
||||||
const proxyUrl = `https://corsproxy.io/?${encodeURIComponent(dropboxUrl)}`;
|
const proxyUrl = `https://api.allorigins.win/raw?url=${encodeURIComponent(dropboxUrl)}`;
|
||||||
|
|
||||||
const response = await fetch(proxyUrl);
|
const response = await fetch(proxyUrl);
|
||||||
if (!response.ok) {
|
if (!response.ok) {
|
||||||
|
|||||||
Reference in New Issue
Block a user