Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/octahedroid/wp-hacky-proxy
https://github.com/octahedroid/wp-hacky-proxy
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/octahedroid/wp-hacky-proxy
- Owner: octahedroid
- Created: 2020-04-01T00:06:19.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2022-07-27T22:08:05.000Z (over 2 years ago)
- Last Synced: 2023-03-06T11:48:14.837Z (almost 2 years ago)
- Language: PHP
- Size: 313 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# PoC proxying to GCP Buckets from Pantheon
## Description
This wordpress plugin set up a proxy for all routes using the
### Usage
#### Add the plugin to the most used plugins directory
```bash
/wp-content/mu-plugins
```Add a new file named `wp-hacky-proxy.php` on your `/wp-content/mu-plugins` directory, containing the following PHP code.
```php
setSite('pantheon-proxy-wordpress') // pantheon site
->setEnvironment('dev') // pantheon environment
->setFramework('wordpress') // pantheon framework `wordpress` or `drupal`
->setForwards(
[
[
'path' => '/',
'url' => 'http://{site}.static.artifactor.io',
'prefix' => '{site}--{environment}',
]
]
)
->forward();// Using a more complex forward configuration
$hackyproxy
->setSite('pantheon-rogers-funny-words') // pantheon site
->setEnvironment('dev') // pantheon environment
->setFramework('wordpress') // pantheon framework
->setHash('b54df3e') // pantheon hash
->setHashEnabled(true) // pantheon hash-flag
->setCacheDisabled(true) // cache-control
->setForwards(
[
[
'path' => '/static/',
'url' => 'http://{site}.static.artifactor.io',
'prefix' => '{site}--{environment}',
],
[
'path' => '/',
'url' => 'https://us-central1-webops-prototypes.cloudfunctions.net',
'prefix' => '{site}--{environment}',
],
]
)
->forward();
```Add on the `autotload` section of your `composer.json` file the following configuration.
```json
"files": [
"proxy-loader.php"
]
```