mirror of
https://github.com/streetwriters/notesnook-sync-server.git
synced 2026-02-12 11:12:44 +00:00
common: use env vars to get origin cert paths
This commit is contained in:
@@ -17,11 +17,12 @@ You should have received a copy of the Affero GNU General Public License
|
|||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.Net;
|
|
||||||
using System.Net.NetworkInformation;
|
using System.Net.NetworkInformation;
|
||||||
using System.Net.Sockets;
|
using System.Net.Sockets;
|
||||||
|
#if !DEBUG
|
||||||
|
using System;
|
||||||
using System.Security.Cryptography.X509Certificates;
|
using System.Security.Cryptography.X509Certificates;
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace Streetwriters.Common
|
namespace Streetwriters.Common
|
||||||
{
|
{
|
||||||
@@ -83,7 +84,7 @@ namespace Streetwriters.Common
|
|||||||
};
|
};
|
||||||
#else
|
#else
|
||||||
private readonly static string HOST = "localhost";
|
private readonly static string HOST = "localhost";
|
||||||
public readonly static X509Certificate2 OriginSSLCertificate = X509Certificate2.CreateFromPemFile("/home/notesnook/.ssl/CF_Origin_Streetwriters.pem", "/home/notesnook/.ssl/CF_Origin_Streetwriters.key");
|
public readonly static X509Certificate2 OriginSSLCertificate = X509Certificate2.CreateFromPemFile(Environment.GetEnvironmentVariable("ORIGIN_CERT_PATH"), Environment.GetEnvironmentVariable("ORIGIN_CERT_KEY_PATH"));
|
||||||
#endif
|
#endif
|
||||||
public static Server NotesnookAPI { get; } = new()
|
public static Server NotesnookAPI { get; } = new()
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user