From c24c35f4433993e6d571a332440d37be4bd9a9ce Mon Sep 17 00:00:00 2001 From: A B Date: Sun, 23 Feb 2025 21:29:03 +0000 Subject: [PATCH] Fixed content type --- vpn/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vpn/views.py b/vpn/views.py index 887702d..e1d75a9 100644 --- a/vpn/views.py +++ b/vpn/views.py @@ -35,7 +35,7 @@ def shadowsocks(request, link): "server_type": acl.server.server_type, } } - response = yaml.dump(config, allow_unicode=True) + response = json.dumps(config, indent=2) else: config = { "transport": { @@ -56,7 +56,7 @@ def shadowsocks(request, link): } } } - response = json.dumps(config, indent=2) + response = yaml.dump(config, allow_unicode=True) AccessLog.objects.create(user=acl.user, server=acl.server.name, action="Success", data=response)