ShayanRl commited on
Commit
c2bedb6
·
verified ·
1 Parent(s): 7728cb8

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +5 -1
index.html CHANGED
@@ -172,7 +172,11 @@
172
  resultDiv.innerHTML = '<p>Loading...</p>';
173
 
174
  try {
175
- const response = await fetch('https://api.k12jobspot.com/api/Jobs/Search', {
 
 
 
 
176
  method: 'POST',
177
  headers: {
178
  'Content-Type': 'application/json',
 
172
  resultDiv.innerHTML = '<p>Loading...</p>';
173
 
174
  try {
175
+ // Using CORS proxy to bypass CORS restrictions
176
+ const proxyUrl = 'https://corsproxy.io/?';
177
+ const apiUrl = 'https://api.k12jobspot.com/api/Jobs/Search';
178
+
179
+ const response = await fetch(proxyUrl + encodeURIComponent(apiUrl), {
180
  method: 'POST',
181
  headers: {
182
  'Content-Type': 'application/json',