Headless Chrome

Overview Refer: https://developers.google.com/web/updates/2017/04/headless-chrome

With Python: https://duo.com/blog/driving-headless-chrome-with-python

Puppeteer: https://github.com/GoogleChrome/puppeteer

Example Automation: https://tutorialzine.com/2017/08/automating-google-chrome-with-node-js

Getting Started: https://medium.com/@e_mad_ehsan/getting-started-with-puppeteer-and-chrome-headless-for-web-scrapping-6bf5979dee3e

Docker: Refer: https://hub.docker.com/r/justinribeiro/chrome-headless/

NodeJS: Refer: https://www.npmjs.com/package/simple-headless-chrome

$ chromium-browser --headless --disable-gpu --dump-dom https://www.chromestatus.com/

Browsers failing with inline JavaScript Issues

10:19 AM] Rohith Poreddy: These are the changes I made to apache config

# X-FRAME Options
Header set X-Frame-Options SAMEORIGIN

# X-XSS-Protection:
Header always set X-XSS-Protection "1; mode=block"

# X-Content-Type-Options:
Header always set X-Content-Type-Options: nosniff

# Content-Security-Policy
Header set Content-Security-Policy "script-src 'self'; object-src 'self'"

[10:20 AM] Rohith Poreddy: In /etc/httpd/conf/httpd.conf

Setup WordPress SSL for Admin Panel

Refer: http://crunchify.com/wordpress-how-to-force-specific-pages-to-be-secure-ssl-https/

That part is actually pretty easy. Just drop this in the wp-config.php. That’ll force the entire admin over SSL, which is what you want in most cases.

define('FORCE_SSL_ADMIN', true);

 

Disable WordPress Emeds

When updating to a new theme, WP start converting links into embeds, which exposes this site to 3rd party tracking, etc.

Refer: https://kinsta.com/knowledgebase/disable-embeds-wordpress/

Plug-in Used to disable: "Disable Embeds" by Pascal Birchler

Import Site into WordPress – “WP All Import”

Change Footer
/wp-content/themes/twentyseventeen/template-parts/footer/site-info.php

Might need to change Settings, Permalinks, and use category and tag, if the category and tag links do not wori.

Copyright © 2007-17 | PeterJohnRoss.com | Designed by Maurice Ruckman

WP All Import - Import all of the content from another site
By Soflyy

Custom Meta Widget - Use this to customize the Meta Widget
By bitacre

Disable Embeds - Disble Converting Embedded Links
By Pascal Birchler

WP All Import

Refer: https://wordpress.org/plugins/wp-all-import
Refer: https://www.wpallimport.com/documentation/getting-started/importing-an-xml-or-csv-file

Adding Adsense
Refer: https://www.tipsandtricks-hq.com/wordpress-plugin-for-simple-google-adsense-insertion-170

Possible XML Used for an Import

<entry>
<title>Blog Post by Date</title>
<description>This is something that I want to say</description>
<published>2016-01-02</published>
<category>blog|articles|info</category>
</entry>

How to get IP address to point to Akamai Staging

Quick Utlity Using Docker

Refer: https://github.com/markSmurphy/akamai-staging

docker run --rm -it \
  node:18-alpine \
  sh -lc "\
    npm install -g akamai-staging && \
    staging www.hollandamerica.com \
  "

Online Tool

https://www.digwebinterface.com/?hostnames=api.barclays.hollandamerica.com.edgekey-staging.net%0D%0Adev-api.barclays.hollandamerica.com.edgekey-staging.net.&type=&ns=resolver&useresolver=9.9.9.10&nameservers=

Overview of Steps

Step 1: dig book.hollandamerica.com | grep -i edgekey
Step 2: take the edgekey value and append -staging to it and dig it again
Step 3: dig www.hollandamerica.com.edgekey-staging.net
Step 4: Use the answer section and grab the IP address, use in your hosts file
Step 5: Turn on modify headers with Akamai Pragma and look for X-Akamai-Staging

Doing the work

$ dig book.hollandamerica.com | grep -i edgekey
book.hollandamerica.com. 29706 IN CNAME book.hollandamerica.com.edgekey.net.
book.hollandamerica.com.edgekey.net. 6 IN CNAME e4069.x.akamaiedge.net.

$ dig book.hollandamerica.com.edgekey-staging.net
;; ANSWER SECTION:
book.hollandamerica.com.edgekey-staging.net. 300 IN CNAME e4069.x.akamaiedge-staging.net.
e4069.x.akamaiedge-staging.net. 20 IN A 23.34.148.111

This works as of 2017-09-22
/etc/hosts
72.246.55.134 book.hollandamerica.com

You shoud now see this in the header response:
X-Akamai-Staging ESSL

Using Fiddler to set Akamai Headers
Refer: https://community.akamai.com/blogs/EmilioMurillo/2016/04/21/troubleshooting-with-fiddler

Simple test page on book.hollandamerica.com to make sure you can see Akamai Stage
https://book.hollandamerica.com/utilities/SessionDump.jsp