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

www/caddy: Domain presentation under Handlers #3884

Closed
3 tasks done
jeliasson opened this issue Apr 3, 2024 · 1 comment · Fixed by #3891
Closed
3 tasks done

www/caddy: Domain presentation under Handlers #3884

jeliasson opened this issue Apr 3, 2024 · 1 comment · Fixed by #3891
Assignees

Comments

@jeliasson
Copy link

Important notices
Before you add a new report, we ask you kindly to acknowledge the following:

Describe the bug
Domain under "Handlers" is referencing the Domain description rather than the actual domain name.

To Reproduce
Steps to reproduce the behavior:

  1. Create a Domain with e.g. example.com as domain, and Example as description.
  2. Create a Handler and select Reverse Proxy Domain Example.
  3. In the Handler Overview, the Domain column will have Example rather than example.com.

Expected behavior
Under Reverse Domain Proxy and the Domain column, I would expect to see the Domain rather than the description.

Screenshots
image

image

Relevant log files
N/A

Additional context
This might just be by design. If so, feel free to close and I will just re-think about how I go about "Description". 😊

Environment
OPNsense 24.1.4-amd64 with os-caddy version 1.5.2.

@Monviech
Copy link
Sponsor Member

Monviech commented Apr 4, 2024

This is by design, since you could create:
foo.example.com.443
foo.example.com.8443
foo.example.com.10000

And then there would be just "foo.example.com" 3 times in the handlers.

I tried to show a mix of domain name and port with the model relation field, but I didn't get it to work, so I defaulted for a required description.

EDIT:

I can solve it like this, then the description can be chosen more freely.

                    <Model>
                        <reverseproxy>
                            <source>OPNsense.Caddy.Caddy</source>
                            <items>reverseproxy.reverse</items>
                            <display>FromDomain,FromPort</display>
                            <display_format>%s:%s</display_format>
                        </reverseproxy>
                    </Model>

Monviech added a commit to Monviech/opnsense-plugins that referenced this issue Apr 4, 2024
to allow displaying multiple elements instead of only the description. This prevents duplicates being displayed without being able to know which entry is which.

Possibly fixes:
opnsense#3885
opnsense#3884

Also, since the descriptions are used by "internalModelUseSafeDelete", it's better to make them all required.
@Monviech Monviech mentioned this issue Apr 4, 2024
13 tasks
AdSchellevis pushed a commit that referenced this issue Apr 11, 2024
* Update ReverseProxyController.php

Update searchBase() for easier maintainability:

Requires: opnsense/core@2d45b78

* Update caddy_control.py - Change onerestart and other actions to restart

Might fix: #3887

* Update Caddy.xml - Model Relation Fields

to allow displaying multiple elements instead of only the description. This prevents duplicates being displayed without being able to know which entry is which.

Possibly fixes:
#3885
#3884

Also, since the descriptions are used by "internalModelUseSafeDelete", it's better to make them all required.

* Update actions_caddy.conf - Add reload action

The rc.d file communicates directly with the caddy admin endpoint, and can reload the configuration with the /var/run/caddy/caddy.sock without restarting the whole caddy process.

* Update caddy_control.py - Add reload action

The rc.d file communicates directly with the caddy admin endpoint, and can reload the configuration with the /var/run/caddy/caddy.sock without restarting the whole caddy process.

* Update ServiceController.php - Turn off the ForceRestart

Since caddy can use a reload instead

* Add option to set a custom HTTP response code and message instead of using abort. This option can only be set globally in general settings.

* Update pkg-descr - Add 1.5.4

* Update Makefile - Bump to 1.5.4

* Tether the HTTP repond logic to the Access List for more flexibility.

* Update Caddy.xml - Change HTTPResponseCode and Message from general to accesslist

* Add configuration framework for setting custom headers. WIP for #3881

* Update Caddy.xml - This shouldn't be here anymore...

* Update Caddy.xml - Another mistake has sneaked in, fixed.

* Update reverse_proxy.volt - Add new fields to bootgrid

* Add template logic for header manipulation. WIP for #3881

* Update pkg-descr

* Move selectpicker empty option to model in general.volt, using BlankDesc. This fixes the option IPv4+IPv6 not appearing in Dynamic DNS.

* Update Caddyfile - Added some much needed comments the the most important sections and macros of the template. This should improve maintainability.

* Update Caddyfile - Improve Comments, add Copyright header

* Update Caddyfile - Improve comments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

2 participants