Title: Getting own url for HTTP string
Last modified: August 22, 2016

---

# Getting own url for HTTP string

 *  [tholub](https://wordpress.org/support/users/tholub/)
 * (@tholub)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/getting-own-url-for-http-string/)
 * I’m using CAS Maestro to authenticated against our university’s CAS system, from
   an application running on a third-party web host (Pantheon). Recently Pantheon
   has changed some of the way they handle server provisioning and DNS, and that’s
   broken my CAS authentication because of the way the HTTP GET URL is built before
   it’s passed to the CAS server.
 * The problem is that the environment variable $SERVER[‘SERVER_NAME’] and $SERVER[‘
   HTTP_HOST’] are not the same. $SERVER[‘SERVER_NAME’] is the internal Pantheon
   host name; $SERVER[‘HTTP_HOST’] is the public URL of the site. When our CAS server
   sees the internal Pantheon host name, it rejects the authentication request.
 * I was able to work around this by changing line 3094 in phpCAS/CAS/Client.php
   to always use HTTP_HOST in preference to SERVER_NAME, but I’m not sure that’s
   a robust solution; I’d expect a CAS Maestro update to break the hack I just made.
   Is there a way to make this a parameter within CAS Maestro, or to use the WordPress
   site address instead of the server environment variable or something?
 * [https://wordpress.org/plugins/cas-maestro/](https://wordpress.org/plugins/cas-maestro/)

The topic ‘Getting own url for HTTP string’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/cas-maestro_009fe3.svg)
 * [CAS Maestro](https://wordpress.org/plugins/cas-maestro/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/cas-maestro/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/cas-maestro/)
 * [Active Topics](https://wordpress.org/support/plugin/cas-maestro/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/cas-maestro/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/cas-maestro/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [tholub](https://wordpress.org/support/users/tholub/)
 * Last activity: [11 years, 2 months ago](https://wordpress.org/support/topic/getting-own-url-for-http-string/)
 * Status: not resolved