Skip to content

Instantly share code, notes, and snippets.

@hasegawayosuke
Last active April 10, 2017 09:53
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hasegawayosuke/74bc582a20432ec053b4ecdcd13da748 to your computer and use it in GitHub Desktop.
Save hasegawayosuke/74bc582a20432ec053b4ecdcd13da748 to your computer and use it in GitHub Desktop.
ワールドプレスっていうブログを運営するための最強ツール

ワールドプレスっていうブログを運営するための最強ツール

Vurp っていうのを使うとWordPressも簡単にワールドプレスにできる。

適当にWordPressを立ち上げておいて、 config.js を以下のように設定する。

"use strict";

const config = {
    hostname : "example.jp",        
    upstream : "http://wordpress.example.com", // 上流のWordPressが動いているサイト
    listen : {
        port : 80,
    },
    overrideHost : "wordpress.example.com",
    vulnerabilities : [
        {
            url : "*",    
            method : "*",
            stripRequestHeaders : ["Accept-Encoding"],  
            stripResponseHeaders: ["Content-Length"],  
            replaceHtml : {                           
                pattern : /([^\w])(WordPress)([^\w])"/g,   
                replacement : function(){                          
                    return arguments[1] + "ワールドプレス" + arguments[3];
                }
            }
        }
    ]
};

exports.config = config;

参考文献

ワールドプレスっていうブログ運営最強ツールを知ってる?? - 楽しいことを全力に!

@hasegawayosuke
Copy link
Author

動くか試してないんで知らない。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment