Skip to content

Commit

Permalink
point index and image to correct spots in the WASM entrypoint
Browse files Browse the repository at this point in the history
  • Loading branch information
deg4uss3r committed Jan 25, 2024
1 parent dc07758 commit 9e334e7
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
use fastly::http::{header, Method, StatusCode};
use fastly::limits::ResponseLimits;
use fastly::{mime, Error, Request, Response};

#[fastly::main]
Expand Down Expand Up @@ -92,6 +93,16 @@ fn main(req: Request) -> Result<Response, Error> {
.with_content_type(mime::TEXT_HTML_UTF_8)
.with_body(include_str!("static_site/hosfe.lt/public/posts/edge/index.html")))
},
"/posts/edge2/" => {
Ok(Response::from_status(StatusCode::OK)
.with_content_type(mime::TEXT_HTML_UTF_8)
.with_body(include_str!("static_site/hosfe.lt/public/posts/edge2/index.html")))
},
"/images/edge-post-2_certificate.png" => {
Ok(Response::from_status(StatusCode::OK)
.with_content_type(mime::IMAGE_PNG)
.with_body(include_bytes!("static_site/hosfe.lt/public/images/edge-post-2_certificate.png").as_slice()))
},
// Catch all other requests and return a 404.
_ => {
Ok(Response::from_status(StatusCode::OK)
Expand Down

0 comments on commit 9e334e7

Please sign in to comment.