Skip to content

Commit

Permalink
Provide an example of an external cross-origin redirect
Browse files Browse the repository at this point in the history
  • Loading branch information
jayohms committed Jan 9, 2025
1 parent f5d60c3 commit 73952ef
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,10 @@ app.get("/redirected", (request, response) => {
response.render("redirected", { title: "Redirected Page" })
})

app.get("/follow-external-redirect", (request, response) => {
response.redirect("https://37signals.com")
})

app.get("/reference", (request, response) => {
response.render("reference", { title: "Reference", page_class: "index" })
})
Expand Down
4 changes: 4 additions & 0 deletions views/index.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@
<div class="actions__icon --redirect" aria-hidden="true"></div>
Follow a redirect
</a>
<a class="actions__item" href="/follow-external-redirect">
<div class="actions__icon --redirect" aria-hidden="true"></div>
Follow an external redirect
</a>
<a class="actions__item" href="/files">
<div class="actions__icon --files" aria-hidden="true"></div>
See how files work
Expand Down

0 comments on commit 73952ef

Please sign in to comment.