From 27759d1baf01f8a6ee13c30dea0f758bfc4cfa6e Mon Sep 17 00:00:00 2001 From: sergiotarxz Date: Sat, 20 Jul 2024 05:24:41 +0200 Subject: [PATCH] Changing filename for wg0. --- lib/VPNManager/Controller/Main.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/VPNManager/Controller/Main.pm b/lib/VPNManager/Controller/Main.pm index b18f62f..301fa3f 100644 --- a/lib/VPNManager/Controller/Main.pm +++ b/lib/VPNManager/Controller/Main.pm @@ -4,6 +4,7 @@ use v5.38.2; use strict; use warnings; +use Encode qw/decode encode/; use Crypt::Bcrypt qw/bcrypt_check/; use VPNManager::Schema; @@ -117,7 +118,8 @@ PublicKey = $publickey AllowedIPs = @{[$config->{vpnclients}{allowedips}]} Endpoint = @{[$config->{vpnclients}{endpoint}]}:@{[$config->{vpnclients}{server_port}]} EOF - my $filename = $user->name . '-vpn.conf'; + my $filename = 'wg0.conf'; + $self->res->headers->add( 'Content-Type', 'application/x-download;name=' . $filename ); $self->res->headers->add( 'Content-Disposition',