Re: httpd(8) - Cross-Origin Resource Sharing (CORS) header

2022-06-26 Thread Stuart Henderson
On 2022-06-27, David Rinehart  wrote:
> Is there a way to add a CORS header to httpd(8) responses for static
> content?

No.

> I see three options:
>     1. Create a diff that adds a server CORS property to httpd.conf(5).
>     2. Create a diff that adds generic header NVPs to httpd.conf(5).
>     3. Create a local patch to hard code the header, along with existing
> headers.
>
> If there is not an existing solution, is there any interest in adding
> the CORS header as a feature of httpd(8)?

2 was rejected before when I suggested using it instead of the dedicated
keywords that are already there for adding HSTS headers, but maybe
things are different now.


-- 
Please keep replies on the mailing list.



httpd(8) - Cross-Origin Resource Sharing (CORS) header

2022-06-26 Thread David Rinehart
Hello All,

Is there a way to add a CORS header to httpd(8) responses for static
content?

Here is a summary of the issue:
    Client request -> httpd Server1
    Server1 response ->  Client
    Client jS xmlhttprequest for static content -> httpd Server2
    Server2 response -> Client
    CORS block, due to missing CORS header in Server2 response

I have not found a way to add the CORS header value for static content
from httpd(8).  Am I missing something here?

To work around this, I have created CGI to add the header and return the
file contents.  The CGI script does not add much value.

I believe relayd(8) could add the header.  This solution would add a
layer of complexity that I prefer to avoid.

Both of these solutions add complexity that would be avoided entirely if
httpd(8) could be configured to add the CORS header.

I see three options:
    1. Create a diff that adds a server CORS property to httpd.conf(5).
    2. Create a diff that adds generic header NVPs to httpd.conf(5).
    3. Create a local patch to hard code the header, along with existing
headers.

If there is not an existing solution, is there any interest in adding
the CORS header as a feature of httpd(8)?

Thanks,
--
David Rinehart



Re: Resizing encrypted disk

2022-06-26 Thread Crystal Kolipe
On Sun, Jun 26, 2022 at 04:25:56AM +0100, Chris Narkiewicz wrote:
> Now, I modified sd1a partition by growing it.
> When I attach the volume using bioctl, it mounts,
> but disklabel -v sd2 shows the same number of sectors and
> and I'm unable to grow the decrypted partition sd2a to fill sd1a.

https://www.exoticsilicon.com/research/resizing_softraid_volumes

Backup your data first.

A port of es-srme was also sent to -ports a while ago.



Re: how to completely reset all networking configuration without rebooting?

2022-06-26 Thread Theo de Raadt
Jonathan Thornburg  wrote:

> In ,
> Stuart Henderson  wrote
> > netstart does nothing to clear existing configuration. It wouldn't make
> > sense to do this for joinlist without also e.g. clearing IP addresses
> > from interfaces as needed, resetting media options/MTU/rdomain/VLAN
> > configuration, etc.
> 
> So, is there a way to to completely reset all networking configuration
> without rebooting?

No.