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

Add support for IndexHeadInsert for directories #2542

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

trefzer
Copy link
Contributor

@trefzer trefzer commented Apr 20, 2024

Summary

add option IndexHeadInsert for directories

Additional Context

Option was missing ;)

Related Issues (if any)

@smortex smortex changed the title add option IndexHeadInsert for directory Add support for IndexHeadInsert for directories Apr 20, 2024
@smortex
Copy link
Collaborator

smortex commented Apr 20, 2024

This option is also availabile in the global server config and virtual hosts. Do you want to add the corresponding parameters to this PR?

@trefzer
Copy link
Contributor Author

trefzer commented Apr 21, 2024

@smortex there is no need to add this as a parameter to init.pp or vhost.pp since it is a value in the directory hash. (or do I missunderstand youre statement ?)

But another thing, that I realized, is that the options are only applied for provider == Directory (templates/vhost/_directories.erb line 33) which I think is wrong (at least the Index options seem to work for provider == Location on apache but not in puppet).

@smortex
Copy link
Collaborator

smortex commented Apr 22, 2024

@smortex there is no need to add this as a parameter to init.pp or vhost.pp since it is a value in the directory hash. (or do I missunderstand youre statement ?)

I am referring to https://httpd.apache.org/docs/current/mod/mod_autoindex.html#indexheadinsert, more specifically:

Context: server config, virtual host, directory, .htaccess

I understand that you can also set this at the vhost or server level so that you do not need to repeat the configuration for each directory. It may make sense to add another new parameter to both the apache and apache::vhost classes and the corresponding templates to allow setting this parameter at any supported location.

But another thing, that I realized, is that the options are only applied for provider == Directory (templates/vhost/_directories.erb line 33) which I think is wrong (at least the Index options seem to work for provider == Location on apache but not in puppet).

I am not sure to follow. <Location ...>, <Directory ...> etc are handled by the module through the directories parameter where each entry indicate which provider to use. It probably allows to build invalid configuration for apache that is accepted by Puppet (e.g. adding a IndexHeadInsert into a <Proxy ...>), but it goes beyond the scope of this PR and I don't think we should worry about this.

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

Successfully merging this pull request may close these issues.

4 participants