mirror of
https://github.com/islehorse/HISP.git
synced 2025-04-06 05:05:40 +12:00
18 lines
600 B
C#
Executable file
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;
|
|
}
|
|
}
|
|
}
|