Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Base URLs using Environment Variables #14

Closed
chadcrowell opened this issue Jul 15, 2019 · 2 comments
Closed

Support for Base URLs using Environment Variables #14

chadcrowell opened this issue Jul 15, 2019 · 2 comments

Comments

@chadcrowell
Copy link

chadcrowell commented Jul 15, 2019

The sites in this Craft install all get there Base URLs from ENV vars:
https://d.pr/i/dlmcNP

When I am testing the redirectMap locally with these config settings:

return [
    'cacheEnabled' => true,
    //'dbPath' => '',
    'autoRedirectEnabled' => true,
    'redirectMap' => [
    	'www' => 'us'
    	],
    'redirectIgnoreBots' => false,
    //use the following for testing locally
    'redirectIgnoreAdmins' => false,
    'forceIp' => '72.35.132.254'
 ];

The redirect happens, but the resulting URL is http://store.gcx.craft/$SITE_URL_WWW - it appears that possibly GeoMate isn't parsing the ENV Vars in the site settings. If that's not the case and I have a config issue, let me know what you think may fix it. Otherwise, parsing ENV Vars is a feature request.

Thanks.

@chadcrowell
Copy link
Author

I did end up setting up config file aliases for the ENV Vars and using the alias in the site URL setting does allow Geomate to redirect appropriately. I would like to see support for ENV vars directly though. Thanks.

@aelvan
Copy link
Contributor

aelvan commented Jul 25, 2019

Thanks for reporting, this has been fixed in v1.0.6.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants