Comments (2)
Thanks for the pull request! 🙂
From what I see, the same could be achieved by calling this at your application startup (or anywhere before using the proxy):
Proxy::$AUTH_KEY = 'Bj5pnZEX6DkcG6Nz6AjDUT1bvcGRVhRaXDuKDX9CjsEs2';
Proxy::$ENABLE_AUTH = true;
Proxy::$DEBUG = false;
Proxy::$TARGET_URL = "";
The configuration variables are public static, thus you can change them anytime. Would that fit your use case?
from php-proxy.
In my usecase, I am using a htaccess like this:
RewriteEngine On
RewriteBase /
# no parameter
RewriteCond %{REQUEST_URI} ^/$
RewriteCond %{QUERY_STRING} ^$
RewriteRule . https://www.beispielverein.de/?test1 [R=302,L]
# avoid direct access to Proxy.php
RewriteCond %{REQUEST_URI} ^/Proxy.php$
RewriteRule . https://www.beispielverein.de/?test1 [R=302,L]
RewriteCond %{QUERY_STRING} !^page_id=[0-9]+&civiwp=CiviCRM&q=civicrm%2Fcontribute%2Ftransact.*$
RewriteCond %{QUERY_STRING} !^page_id=[0-9]+&civiwp=CiviCRM&q=civicrm%2Fajax%2Frest.*$
RewriteRule . - [R=403,L]
FallbackResource /Proxy.php
So Proxy.php is the fallback, and directly called.
The goal is to prevent access to the CRM system, but only allow access to the public forms of the CRM system.
Ok, I understand now, I could set it all up with composer, and have an index.php instead, which uses Zounar\PHPProxy\Proxy
.
from php-proxy.
Related Issues (10)
- how can we handle cookies HOT 1
- How to pass GET parameters or the whole QUERY_STRING
- Php version HOT 6
- https HOT 1
- can it replace all the url about one site just like www.a.com/*,"*"can be abc or ... HOT 1
- not install package with composer? HOT 1
- Broken URL's HOT 2
- Json No Work
- Just a question HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from php-proxy.