[OPNWAF] Per virtual server option: redirect non-www to www
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 72/100
Línea de trabajo
Start by locating the OPNWAF virtual server modal and the code that generates gateway_vhost.conf; the issue names the existing RewriteRule and the desired behavior. Trace how virtual server options reach the generated configuration, then check the relevant plugin tests or validation path. Done when the per-server checkbox produces the requested single redirect when enabled and preserves the current rule when disabled.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Important notices
Before you add a new report, we ask you kindly to acknowledge the following:
- I have read the contributing guide lines at https://github.com/opnsense/plugins/blob/master/CONTRIBUTING.md
- I have searched the existing issues, open and closed, and I'm convinced that mine is new.
- When the request is meant for an existing plugin, I've added its name to the title.
Is your feature request related to a problem? Please describe.
If the "HTTP to HTTPS" option is enabled, the OPNWAF plugin redirects http://example.com to https://example.com, but not to the canonical https://www.example.com. The non-www to www redirect currently has to be done by the web server itself (e.g. via .htaccess), resulting in two consecutive redirects before reaching the canonical host.
Describe the solution you'd like
A per-virtual-server checkbox in the virtual server modal: "Redirect non-www to www". When enabled, requests to http://example.com should be redirected in a single redirect to https://www.example.com.
In the generated gateway_vhost.conf, the virtual host currently contains:
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
With the option enabled it should instead contain:
RewriteRule ^(.*)$ https://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
Describe alternatives you've considered
Handling the non-www to www redirect from the web server itself via .htaccess, which works but requires a second redirect and moves canonicalization away from the edge.
Additional context
None.
- Lenguaje dominante
- PHP
- Estrellas
- 1.2k
- Forks
- 926
- Merge medio
- 1 d 10 h
- PR fusionados (30 d)
- 25
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de opnsense/plugins
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
opnsense/plugins#5976 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
net/haproxy: IPv6 literal in real server "Source address" generates an invalid `source` directiveAbiertoincomplete
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
opnsense/plugins#5973 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
[dns/ddclient] Support hiding unused standard fields per service (optional_hiding)Posiblemente ocupada @bringha1 la tomó hace 1 día. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
q-feeds-connector: "error in configd communication" every update when the Unbound DNSBL rebuild takes longer than 120sPosiblemente ocupada @mhatipog la tomó hace 9 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
Todos los issues de opnsense/plugins
Issues similares
-
15.0
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
open-telemetry/opentelemetry-php-distro#176 ·
Los mantenedores suelen responder en 2 días
-
No Code Attached Yet
Dificultad 2/5 1-3 horas Aptitud para principiantes 77/100
joomla/joomla-cms#48941 ·
Los mantenedores suelen responder en 1 día
-
needs-triage Platform(Default)
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
bug new
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
moodle-an-hochschulen/moodle-theme_boost_union#1500 ·
Los mantenedores suelen responder en 1 día