You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> if this version causes issues, use the latest version from the cdn (even if i forget to update these docs). use the [npm link](https://www.npmjs.com/package/jsjiit) to find the latest version number.
29
29
30
-
then let's speedrun this depression:
30
+
### 🚨 CORS Issues? (for browser usage)
31
+
32
+
JIIT recently added CORS restrictions that block cross-origin requests. if you're using this in a browser and getting CORS errors, enable proxy mode:
33
+
34
+
```javascript
35
+
// create portal with proxy mode enabled (to bypass CORS)
36
+
constportal=newWebPortal({
37
+
useProxy:true,
38
+
proxyUrl:'https://your-cors-proxy.com // REQUIRED when useProxy is true
39
+
});
40
+
```
41
+
42
+
> **why proxy mode?**
43
+
> JIIT's backend now only allows same-origin requests. the proxy server receives your request, forwards it to JIIT (server-to-server, no CORS), and returns the response with proper CORSheaders. your frontend → proxy → JIIT → proxy → your frontend.
44
+
>
45
+
>**note:** you need to deploy your own CORS proxy and pass the URL when creating the WebPortal instance. yeah, fuck jpoop.
46
+
47
+
if you're running from the same domain as JIIT (you're not), or outside of a browser environment, you can skip proxy mode:
31
48
32
49
```javascript
33
-
//create your portal buddy (they won't leave you like she did)
0 commit comments