pantheon-systems / pantheon_domain_masking

Domain Masking helper module for D8
GNU General Public License v2.0
11 stars 6 forks source link

Avoid duplicate subpaths #3

Closed benjaminbradley closed 4 years ago

benjaminbradley commented 4 years ago

This checks the three variables (SCRIPT_NAME, REQUEST_URI, and SCRIPT_FILENAME) to see if the subpath is already present before adding it. For SCRIPT_NAME and REQUEST_URI it explicitly checks to see if the string begins with the subpath. For SCRIPT_FILENAME, it just checks to see if the subpath is present within the string (this seems like it could be prone to error if a short or common string is chosen for the subpath).