puppetlabs-apache
puppetlabs-apache copied to clipboard
Add support for all proxy schemes, not just https://
This commit fixes https://github.com/puppetlabs/puppetlabs-apache/issues/2285 by supporting all mod_proxy schemes according to the documentation here:
https://httpd.apache.org/docs/2.4/mod/mod_proxy.html
Looks like the tests fail on this.
I also wonder if this should be a type alias.
Looks like the tests fail on this.
I also wonder if this should be a type alias.
I would agree on this
Is it valid to not specify anything or should it be
I don't think that's correct, because I took my regex directly from Stdlib:HTTPSUrl
https://github.com/puppetlabs/puppetlabs-stdlib/blob/main/types/httpsurl.pp
Which is:
type Stdlib::HTTPSUrl = Pattern[/(?i:\Ahttps://.*\z)/]
Looks like the tests are failing.
Also, it's possible to add tests for a type alias: https://rspec-puppet.com/documentation/type_aliases/
Ok, I'll add the tests for this new type alias.
Small detail, but this looks good.
I don't think that's correct, because I took my regex directly from Stdlib:HTTPSUrl
https://github.com/puppetlabs/puppetlabs-stdlib/blob/main/types/httpsurl.pp
Which is:
type Stdlib::HTTPSUrl = Pattern[/(?i:\Ahttps://.*\z)/]
Interesting. That implies it also accepts https:// which doesn't make sense to me since I don't consider it an HTTP(S) URL.
Small detail, but this looks good.
I don't think that's correct, because I took my regex directly from Stdlib:HTTPSUrl https://github.com/puppetlabs/puppetlabs-stdlib/blob/main/types/httpsurl.pp Which is: type Stdlib::HTTPSUrl = Pattern[/(?i:\Ahttps://.*\z)/]
Interesting. That implies it also accepts
https://which doesn't make sense to me since I don't consider it an HTTP(S) URL.
Actually, you're correct. We shouldn't allow an empty value after ://
I'll fix that with your suggestion.
It looks like the Stdlib:HTTPSUrl allows that for some reason?
It looks like the Stdlib:HTTPSUrl allows that for some reason?
Possibly an oversight and nobody ran into problems because of it.
The spec tests are failing, but I can't figure out why?
Resource type not found: Apache::ModProxyProtocol
Not sure why it's giving me that error?
Because of https://github.com/puppetlabs/puppetlabs-apache/pull/2289#discussion_r948196017. You must name it according to the conventions so the loader finds it, so types/mod_proxy_protocol.pp.