-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to redirect to a variable address? #373
Comments
@keving17 Awesome progress! This looks great overall and nice description of what's going on 👍 Reading through the code quickly, it looks like the "create" flow has all the pieces. For So that would mean changing the Right now, the chain of what is happening is:
What you're thinking here could work, you could have the server just send back the URL it should redirect to, and have |
Ok. So I think I understand what you're saying. We should be able to make the entire interaction purely server-side. However, I'm still a bit lost on how to make this work. I feel like I can't get response.redirect(path) to work as intended. The idea is to get rid of all of the code I have in client. and change the index.js in server to have
which should catch things like
|
I'm working on creating sessions and having shareLinks redirect to some longer url. That way, a teacher educator can say they want to use the Turner scenario and give the site:
https://teachermoments.teachingsystemslab.org/teachermoments/turner?fromdemos
and get back a unique share link to give out to students:
https://teachermoments.teachingsystemslab.org/share/[some_random_string]
instead of having to tell students to go to the longer actual link:
https://teachermoments.teachingsystemslab.org/teachermoments/turner?fromdemos&share=[the_same_random_string_from_before]
The form looks like this:
I can generate the share links. And I have a database that connects the unique share links to their actual link. I have a page that shows what it should be redirecting to but I can't get the page to redirect.
I've looked at the
enforceHTTPS
inindex.js
but I still don't know where I'm going wrong. In inspecting the browser, I can see the 302 for redirecting and a 200 on redirect link but I can't figure out why it doesn't go to the page.Any clues @kevinrobinson ?
Code can be found here: https://github.com/mit-teaching-systems-lab/threeflows/tree/patch/createSession
The text was updated successfully, but these errors were encountered: