Fix proxy-less deployment

This commit is contained in:
spikecodes 2020-12-28 20:49:15 -08:00
parent 3115ff3436
commit f00ef59404
2 changed files with 3 additions and 1 deletions

View File

@ -5,6 +5,7 @@ use base64::decode;
pub async fn handler(web::Path(url): web::Path<String>) -> Result<HttpResponse> { pub async fn handler(web::Path(url): web::Path<String>) -> Result<HttpResponse> {
if cfg!(feature = "proxy") { if cfg!(feature = "proxy") {
#[cfg(feature = "proxy")]
let media: String; let media: String;
#[cfg(not(feature = "proxy"))] #[cfg(not(feature = "proxy"))]

View File

@ -4,7 +4,8 @@
{% block head %} {% block head %}
<title>{% block title %}Libreddit{% endblock %}</title> <title>{% block title %}Libreddit{% endblock %}</title>
<meta http-equiv="Referrer-Policy" content="no-referrer"> <meta http-equiv="Referrer-Policy" content="no-referrer">
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; style-src 'self' 'unsafe-inline'; base-uri 'none'; form-action 'self';"> <meta http-equiv="Content-Security-Policy" content="default-src 'self'; style-src 'self' 'unsafe-inline'; base-uri 'none'; form-action 'self';
{% if cfg!(not(feature = "proxy")) %}img-src https://*; media-src https://*{% endif %}">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="description" content="View on Libreddit, an alternative private front-end to Reddit."> <meta name="description" content="View on Libreddit, an alternative private front-end to Reddit.">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">