Skip to content

How to redirect to a variable address? #373

@keving17

Description

@keving17

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:
screen shot 2018-06-10 at 7 23 51 pm

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.
screen shot 2018-06-10 at 7 17 04 pm

I've looked at the enforceHTTPS in index.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.
screen shot 2018-06-10 at 7 19 17 pm
screen shot 2018-06-10 at 7 21 12 pm

Any clues @kevinrobinson ?
Code can be found here: https://github.com/mit-teaching-systems-lab/threeflows/tree/patch/createSession

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions