wikidot.croquembouche.net Magic proxy for *.wikidot.com and *.wdfiles.com This proxy can: * Let you use uploaded HTML files in iframes directly * Fetch Wikidot pages/files from browser JavaScript (and bypass CORS) Supports read-only operations (GET) on public resources only. Requests are cached for 1 hour by default to help ease the load on Wikidot. Source code: https://github.com/croque-scp/wikidot-cors-proxy HOW TO USE ========== Pass the target Wikidot URL as a ?url= parameter to this proxy: https://wikidot.croquembouche.net/?url=https://my-site.wikidot.com/page-name Then use that proxied URL instead of the original URL. If the original URL contains an '&' character, you need to percent-encode it (e.g. use https://www.url-encode-decode.com). EMBEDDING UPLOADED FILES ------------------------ Wikidot blocks direct embedding (iframing) of files uploaded via the Files option on each page (e.g. HTML files). This proxy can bypass that restriction. First get the file's URL: open the Files at the bottom of the page, right-click the file's name, and Copy Link to get the file's URL. You can reference it, through the proxy, in an iframe: [[iframe https://wikidot.croquembouche.net/?url=THE_FILE_URL]] E.g.: [[iframe https://wikidot.croquembouche.net/?url=https://scp-wiki.wdfiles.com/local--files/scp-001/twine.html]] You can also go to that URL directly in the browser to view it as a webpage. BYPASSING CORS -------------- In JavaScript, call fetch() on proxied Wikidot URLs. E.g. to fetch the text of a CSS code block (JavaScript): const target = "https://scp-wiki.wikidot.com/component:croqstyle/code/1"; const proxied = "https://wikidot.croquembouche.net/?url=" + encodeURIComponent(target); const response = await fetch(proxied); const text = await response.text(); // or .blob() for images Caching: responses are reused for up to an hour by default. Override per request with the X-Proxy-Cache header: await fetch(proxied, { headers: { "X-Proxy-Cache": "max-age=3600" } }); max-age=3600 accept a cached copy up to 1h old (very efficient) max-age=30 accept a cached copy up to 30s old (kinda efficient) no-cache always fetch a fresh copy (inefficient, very impolite) X-Cache response header tells you if it was cached or not (HIT / MISS). Rate limit: 60 requests per 10 seconds per IP, then it'll error with HTTP 429. If you find yourself hitting the limit, you can cache the responses in your own code (e.g. browser sessionStorage) to avoid repeated requests.