HISP/HorseIsleServer/LibHISP/Security/CrossDomainPolicy.cs
2022-11-20 12:47:18 +13:00

18 lines
600 B
C#
Executable file

using HISP.Properties;
using System.IO;
using HISP.Server;
namespace HISP.Security
{
public class CrossDomainPolicy
{
public static byte[] GetPolicyFile()
{
if (!File.Exists(ConfigReader.CrossDomainPolicyFile)) {
Logger.InfoPrint("Cross-Domain-Policy file not found, using default");
File.WriteAllText(ConfigReader.CrossDomainPolicyFile, Resources.DefaultCrossDomain);
}
byte[] policyFileBytes = File.ReadAllBytes(ConfigReader.CrossDomainPolicyFile);
return policyFileBytes;
}
}
}