forked from Alexxz/Simple-php-proxy-script
-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathexample.simple-php-proxy_config.php
More file actions
32 lines (25 loc) · 940 Bytes
/
example.simple-php-proxy_config.php
File metadata and controls
32 lines (25 loc) · 940 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<?php
/*
Allowed destination host, request URIs are fetched from there
Say your proxy script resides on "http://www.alice.com/folder/simple-php-proxy/src/index.php"
You set
$dest_host = "bob.com";
$proxy_base_url = '/folder/simple-php-proxy/src';
A request to "http://www.alice.com/folder/simple-php-proxy/src/index.php/my_other_uri/that/resides/on/bob"
would now be proxied to
"http://bob.com/my_other_uri/that/resides/on/bob"
and the output returned
replace this to where you want to proxy
*/
$dest_host = "bash.org";
/*
Location of your proxy index script relative to your web root
The first slash is needed the trailing slash is optional
Use '/my_project/simple-php-proxy/src' if you place the whole folder within your project
or for usage at webroot level use '/'
*/
$proxy_base_url = '/';
/*
What headers to proxy from destination host to client
*/
$proxied_headers = array('Set-Cookie', 'Content-Type', 'Cookie', 'Location');