Use USE_HTTPS to compute AP URLs

Instead of relying on cfg(debug_assertions)
This commit is contained in:
Bat
2018-06-26 16:21:58 +02:00
parent f805ec1d53
commit 507d3e6183
6 changed files with 16 additions and 17 deletions
-10
View File
@@ -17,16 +17,6 @@ pub mod sign;
pub const CONTEXT_URL: &'static str = "https://www.w3.org/ns/activitystreams";
pub const PUBLIC_VISIBILTY: &'static str = "https://www.w3.org/ns/activitystreams#Public";
#[cfg(debug_assertions)]
pub fn ap_url(url: String) -> String {
format!("http://{}", url)
}
#[cfg(not(debug_assertions))]
pub fn ap_url(url: String) -> String {
format!("https://{}", url)
}
pub fn context() -> serde_json::Value {
json!([
CONTEXT_URL,