Skip to content

Instantly share code, notes, and snippets.

@kyupark
kyupark / index.js
Created March 2, 2023 18:41 — forked from Kahtaf/index.js
Create a simple CORS proxy with Cloudflare Workers to bypass CORS restrictions in the browser. Perfect for local development.
/**
* Create a simple CORS proxy with Cloudflare Workers
* to bypass cors restrictions in the browser.
* Example Usage: https://<worker_subdomain>.workers.dev/https://postman-echo.com/get?foo1=bar1&foo2=bar2
*/
addEventListener('fetch', event =>
event.respondWith(handleRequest(event.request))
)
@kyupark
kyupark / mobile-browser-detect.html
Last active June 21, 2018 16:10 — forked from braddown/mobile-browser-detect
Link for App Download - Mobile OS Detection and Redirect Download Link to Appropriate App Store
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Redirect</title>
<script type="text/javascript"> // <![CDATA[
// iPhone or iPad Version:
if((navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPad/i))) {
window.location = "https://itunes.apple.com/us/app/fkcc/id1364772616?mt=8";
}