Skip to content

Instantly share code, notes, and snippets.

Hacking away on @EdgeSEO tools.

Joey Burzynski JoeyBurzynski

Hacking away on @EdgeSEO tools.
View GitHub Profile
JoeyBurzynski / cloudflare-worker-ip-to-real-client-ip-address.js
Last active April 7, 2023 19:16
Resolving Cloudflare Worker IP Issues [Replace Cloudflare Worker IP with Real Client IP in X-Forwarded-For HTTP Header]
View cloudflare-worker-ip-to-real-client-ip-address.js
// Cloudflare Worker Sandbox Examples
// Learning here, not intended for production use.
addEventListener('fetch', event => {
JoeyBurzynski / i-design-with-code.markdown
Created March 27, 2023 11:41
View i-design-with-code.markdown
JoeyBurzynski / renovate.json
Created February 15, 2023 09:58
Renovate Configuration
View renovate.json
"extends": [
JoeyBurzynski / sample-hreflang-annotations-in-html-markup.html
Created February 6, 2023 08:07
Sample Hreflang Annotations via HTML Markup
View sample-hreflang-annotations-in-html-markup.html
<!-- x-default: default when no language matches -->
<link rel="alternate" hreflang="x-default" href=""/>
<!-- English (en) -->
<link rel="alternate" hreflang="en" href=""/>
<!-- Arabic: macrolanguage (ar) -->
<link rel="alternate" hreflang="ar" href=""/>
<!-- Chinese (zh) -->
JoeyBurzynski / sample-hreflang-annotations-in-xml-sitemap.xml
Last active February 6, 2023 07:59
Sample hreflang annotations via XML sitemap
View sample-hreflang-annotations-in-xml-sitemap.xml
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns=""
<!-- Arabic: macrolanguage (ar) -->
JoeyBurzynski / globalErrorHandler.js
Created February 1, 2023 20:38
JavaScript: Global onerror handler
View globalErrorHandler.js
window.addEventListener('error', function(e) {
var errorText = [
'URL: ' + e.filename,
'Line: ' + e.lineno + ', Column: ' + e.colno,
'Stack: ' + (e.error && e.error.stack || '(no stack trace)')
// Example: log errors as visual output into the host page.
// Note: you probably don't want to show such errors to users, or
JoeyBurzynski /
Last active October 7, 2022 07:54
JavaScript: How to Deal with Unhandled Exceptions & Unhandled Promise Rejections in JavaScript
JoeyBurzynski /
Created June 25, 2022 13:06
Tutorial: How to Configure a Reverse Proxy for Use with WPEngine/Wordpress Sites [2022]

Configuration: How to Configure a Reverse Proxy for Use with WPEngine/Wordpress Sites [2022]

Configure an external proxy from to

Make sure you send the Cache-Control $http_cache_control header in your requests to WP Engine. If this isn’t configured you will be permanently logged into /wp-admin and it will not auto logout. That can be a serious security concern.

Make sure you pass the X-Forwarded-For headers to WP Engine so that we see the actual IPs and not the proxy IP. If this isn’t in place, you will get blocked by WP Engine’s firewall.

JoeyBurzynski / wpengine-stop-htaccess-rewrites.php
Created June 25, 2022 12:36
WP Plugin Stop htaccess rewrites
View wpengine-stop-htaccess-rewrites.php
* Stop htaccess rewrites
* @package wpengine-stop-htaccess-rewrites
* @author wpengine
* @license Proprietary
* @wordpress-muplugin