Fix subreddit sorting and media
This commit is contained in:
parent
1653d4fb4c
commit
bfcc4c985d
@ -75,7 +75,7 @@ async fn main() -> std::io::Result<()> {
|
|||||||
.header("X-Frame-Options", "DENY")
|
.header("X-Frame-Options", "DENY")
|
||||||
.header(
|
.header(
|
||||||
"Content-Security-Policy",
|
"Content-Security-Policy",
|
||||||
"default-src 'none'; style-src 'self' 'unsafe-inline'; base-uri 'none'; img-src 'self' data:; form-action 'self'; frame-ancestors 'none';",
|
"default-src 'none'; media-src 'self'; style-src 'self' 'unsafe-inline'; base-uri 'none'; img-src 'self' data:; form-action 'self'; frame-ancestors 'none';",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
// Default service in case no routes match
|
// Default service in case no routes match
|
||||||
|
@ -44,7 +44,7 @@ pub async fn page(req: HttpRequest) -> HttpResponse {
|
|||||||
front_page.to_owned()
|
front_page.to_owned()
|
||||||
});
|
});
|
||||||
|
|
||||||
let path = format!("/r/{}.json?{}", sub, req.query_string());
|
let path = format!("/r/{}/{}.json?{}", sub, sort, req.query_string());
|
||||||
|
|
||||||
match fetch_posts(&path, String::new()).await {
|
match fetch_posts(&path, String::new()).await {
|
||||||
Ok((posts, after)) => {
|
Ok((posts, after)) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user