Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 20 additions & 6 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,31 @@ if (!Services.env.isProduction()) {
credentials: true
};
} else {
// TODO: change this when necessary
corsOptions = {
origin: [
`https://${process.env.FRONTEND_ADDRESS_DEPLOY}`,
`https://${process.env.FRONTEND_ADDRESS_BETA}`,
`https://docs.mchacks.ca`
],
origin: (origin, callback) => {
const allowedOrigins = [
`https://${process.env.FRONTEND_ADDRESS_DEPLOY}`,
`https://${process.env.FRONTEND_ADDRESS_BETA}`,
`https://docs.mchacks.ca`
];

const regex = /^https:\/\/dashboard-[\w-]+\.vercel\.app$/;

if (
allowedOrigins.includes(origin) || // Explicitly allowed origins
regex.test(origin) // Matches dashboard subdomains
) {
callback(null, true);
} else {
callback(new Error('Not allowed by CORS'));
}
},
credentials: true
};
}



app.use(cors(corsOptions));
app.use(Services.log.requestLogger);
app.use(Services.log.errorLogger);
Expand Down
2 changes: 1 addition & 1 deletion assets/email/AccountConfirmation.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@
<table border="0" cellpadding="0" cellspacing="0" width="100%" id="templateHeader" style="-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;color:#4D4D4D;mso-table-lspace:0pt;mso-table-rspace:0pt;border-collapse:collapse;" >
<tr>
<td valign="top" class="headerContent" style="-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;color:#4D4D4D;mso-table-lspace:0pt;mso-table-rspace:0pt;" >
<img src="https://mchacks.ca/mchacks-long-tight.png" width="250" height="59" alt="Logo" title="Logo" id="headerImage"
<img src="https://mchacks.ca/martlet-text-13.png" width="250" height="59" alt="Logo" title="Logo" id="headerImage"
mc:label="header_image" mc:edit="header_image" mc:allowdesigner
mc:allowtext style="-ms-interpolation-mode:bicubic;border-width:0;line-height:100%;outline-style:none;text-decoration:none;height:auto;max-width:30%;width:250px;padding-top:20px;padding-bottom:20px;margin-left:auto;margin-right:auto;display:block;" />
</td>
Expand Down
2 changes: 1 addition & 1 deletion assets/email/AccountInvitation.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@
<tr>
<td valign="top" class="headerContent"
style="-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;color:#4D4D4D;mso-table-lspace:0pt;mso-table-rspace:0pt;">
<img src="https://mchacks.ca/mchacks-long-tight.png" width="250" height="59"
<img src="https://mchacks.ca/martlet-text-13.png" width="250" height="59"
alt="Logo" title="Logo" id="headerImage" mc:label="header_image"
mc:edit="header_image" mc:allowdesigner mc:allowtext
style="-ms-interpolation-mode:bicubic;border-width:0;line-height:100%;outline-style:none;text-decoration:none;height:auto;max-width:30%;width:250px;padding-top:20px;padding-bottom:20px;margin-left:auto;margin-right:auto;display:block;" />
Expand Down
2 changes: 1 addition & 1 deletion assets/email/ResetPassword.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@
<table border="0" cellpadding="0" cellspacing="0" width="100%" id="templateHeader" style="-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;color:#4D4D4D;mso-table-lspace:0pt;mso-table-rspace:0pt;border-collapse:collapse;" >
<tr>
<td valign="top" class="headerContent" style="-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;color:#4D4D4D;mso-table-lspace:0pt;mso-table-rspace:0pt;" >
<img src="https://mchacks.ca/mchacks-long-tight.png" width="250" height="59" alt="Logo" title="Logo" id="headerImage"
<img src="https://mchacks.ca/martlet-text-13.png" width="250" height="59" alt="Logo" title="Logo" id="headerImage"
mc:label="header_image" mc:edit="header_image" mc:allowdesigner
mc:allowtext style="-ms-interpolation-mode:bicubic;border-width:0;line-height:100%;outline-style:none;text-decoration:none;height:auto;max-width:30%;width:250px;padding-top:20px;padding-bottom:20px;margin-left:auto;margin-right:auto;display:block;" />
</td>
Expand Down
2 changes: 1 addition & 1 deletion assets/email/Ticket.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@
style="-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;color:#4D4D4D;mso-table-lspace:0pt;mso-table-rspace:0pt;border-collapse:collapse;">
<tr>
<td valign="top" class="headerContent" style="-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;color:#4D4D4D;mso-table-lspace:0pt;mso-table-rspace:0pt;">
<img src="https://mchacks.ca/static/mchacks-long-tight.png" width="250"
<img src="https://mchacks.ca/static/martlet-text-13.png" width="250"
height="59" alt="Logo" title="Logo" id="headerImage" mc:label="header_image"
mc:edit="header_image" mc:allowdesigner mc:allowtext style="-ms-interpolation-mode:bicubic;border-width:0;line-height:100%;outline-style:none;text-decoration:none;height:auto;max-width:30%;width:250px;padding-top:20px;padding-bottom:20px;margin-left:auto;margin-right:auto;display:block;" />
</td>
Expand Down
2 changes: 1 addition & 1 deletion assets/email/Welcome.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@
style="-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;color:#4D4D4D;mso-table-lspace:0pt;mso-table-rspace:0pt;border-collapse:collapse;">
<tr>
<td valign="top" class="headerContent" style="-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;color:#4D4D4D;mso-table-lspace:0pt;mso-table-rspace:0pt;">
<img src="https://mchacks.ca/static/mchacks-long-tight.png" width="250"
<img src="https://mchacks.ca/static/martlet-text-13.png" width="250"
height="59" alt="Logo" title="Logo" id="headerImage" mc:label="header_image"
mc:edit="header_image" mc:allowdesigner mc:allowtext style="-ms-interpolation-mode:bicubic;border-width:0;line-height:100%;outline-style:none;text-decoration:none;height:auto;max-width:30%;width:250px;padding-top:20px;padding-bottom:20px;margin-left:auto;margin-right:auto;display:block;" />
</td>
Expand Down
2 changes: 1 addition & 1 deletion assets/email/marketingEmail/3Days.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@
<tr>
<td valign="top" class="headerContent"
style="-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;color:#4D4D4D;mso-table-lspace:0pt;mso-table-rspace:0pt;">
<img src="https://mchacks.ca/mchacks-long-tight.png" width="250" height="59"
<img src="https://mchacks.ca/martlet-text-13.png" width="250" height="59"
alt="Logo" title="Logo" id="headerImage" mc:label="header_image"
mc:edit="header_image" mc:allowdesigner mc:allowtext
style="-ms-interpolation-mode:bicubic;border-width:0;line-height:100%;outline-style:none;text-decoration:none;height:auto;max-width:30%;width:250px;padding-top:20px;padding-bottom:20px;margin-left:auto;margin-right:auto;display:block;" />
Expand Down
2 changes: 1 addition & 1 deletion assets/email/marketingEmail/EmailBlast.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@
<tr>
<td valign="top" class="headerContent"
style="-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;color:#4D4D4D;mso-table-lspace:0pt;mso-table-rspace:0pt;">
<img src="https://mchacks.ca/mchacks-long-tight.png" width="250" height="59"
<img src="https://mchacks.ca/martlet-text-13.png" width="250" height="59"
alt="Logo" title="Logo" id="headerImage" mc:label="header_image"
mc:edit="header_image" mc:allowdesigner mc:allowtext
style="-ms-interpolation-mode:bicubic;border-width:0;line-height:100%;outline-style:none;text-decoration:none;height:auto;max-width:30%;width:250px;padding-top:20px;padding-bottom:20px;margin-left:auto;margin-right:auto;display:block;" />
Expand Down
6 changes: 3 additions & 3 deletions assets/email/statusEmail/Accepted.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@
<tr>
<td valign="top" class="headerContent"
style="-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;color:#4D4D4D;mso-table-lspace:0pt;mso-table-rspace:0pt;">
<img src="https://mchacks.ca/mchacks-long-tight.png" width="250" height="59"
<img src="https://mchacks.ca/martlet-text-13.png" width="250" height="59"
alt="Logo" title="Logo" id="headerImage" mc:label="header_image"
mc:edit="header_image" mc:allowdesigner mc:allowtext
style="-ms-interpolation-mode:bicubic;border-width:0;line-height:100%;outline-style:none;text-decoration:none;height:auto;max-width:30%;width:250px;padding-top:20px;padding-bottom:20px;margin-left:auto;margin-right:auto;display:block;" />
Expand All @@ -387,12 +387,12 @@
style="-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;color:#4D4D4D;">
Congratulations, {{firstName}}! 🎉
<br><br>
Were thrilled to offer you a spot at McHacks! We can't wait to see what
We're thrilled to offer you a spot at McHacks! We can't wait to see what
you create with us this year.
<br><br>
Confirm your attendance on our <a href="https://app.mchacks.ca/"
style="-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;color:#F2463A;text-decoration:none;">hacker
dashboard</a> no later than <b>January 21th at 11:59PM EST</b>.
dashboard</a> no later than <b>December 15th at 11:59PM EST</b>.
<br><br>
If you can no longer attend McHacks, please let us know as soon as
possible by withdrawing your application on our <a
Expand Down
6 changes: 3 additions & 3 deletions assets/email/statusEmail/Applied.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@
<tr>
<td valign="top" class="headerContent"
style="-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;color:#4D4D4D;mso-table-lspace:0pt;mso-table-rspace:0pt;">
<img src="https://mchacks.ca/mchacks-long-tight.png" width="250" height="59"
<img src="https://mchacks.ca/martlet-text-13.png" width="250" height="59"
alt="Logo" title="Logo" id="headerImage" mc:label="header_image"
mc:edit="header_image" mc:allowdesigner mc:allowtext
style="-ms-interpolation-mode:bicubic;border-width:0;line-height:100%;outline-style:none;text-decoration:none;height:auto;max-width:30%;width:250px;padding-top:20px;padding-bottom:20px;margin-left:auto;margin-right:auto;display:block;" />
Expand Down Expand Up @@ -393,8 +393,8 @@
href="https://app.mchacks.ca/"
style="-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;color:#F2463A;text-decoration:none;">hacker
dashboard</a> until the deadline on <b
style="-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;font-weight: 700;">January
3rd at
style="-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;font-weight: 700;">November
17th at
11:59 PM ET</b>.
<br><br>
In the meantime, follow us on <a href="https://instagram.com/mcgillhacks"
Expand Down
2 changes: 1 addition & 1 deletion assets/email/statusEmail/Checked-in.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@
<tr>
<td valign="top" class="headerContent"
style="-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;color:#4D4D4D;mso-table-lspace:0pt;mso-table-rspace:0pt;">
<img src="https://mchacks.ca/mchacks-long-tight.png" width="250" height="59"
<img src="https://mchacks.ca/martlet-text-13.png" width="250" height="59"
alt="Logo" title="Logo" id="headerImage" mc:label="header_image"
mc:edit="header_image" mc:allowdesigner mc:allowtext
style="-ms-interpolation-mode:bicubic;border-width:0;line-height:100%;outline-style:none;text-decoration:none;height:auto;max-width:30%;width:250px;padding-top:20px;padding-bottom:20px;margin-left:auto;margin-right:auto;display:block;" />
Expand Down
4 changes: 2 additions & 2 deletions assets/email/statusEmail/Confirmed.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@
<tr>
<td valign="top" class="headerContent"
style="-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;color:#4D4D4D;mso-table-lspace:0pt;mso-table-rspace:0pt;">
<img src="https://mchacks.ca/mchacks-long-tight.png" width="250" height="59"
<img src="https://mchacks.ca/martlet-text-13.png" width="250" height="59"
alt="Logo" title="Logo" id="headerImage" mc:label="header_image"
mc:edit="header_image" mc:allowdesigner mc:allowtext
style="-ms-interpolation-mode:bicubic;border-width:0;line-height:100%;outline-style:none;text-decoration:none;height:auto;max-width:30%;width:250px;padding-top:20px;padding-bottom:20px;margin-left:auto;margin-right:auto;display:block;" />
Expand All @@ -387,7 +387,7 @@
style="-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;color:#4D4D4D;">
Hi, {{firstName}},
<br><br>
Thanks for confirming your attendance for McHacks! We hope youre just
Thanks for confirming your attendance for McHacks! We hope you're just
as excited as we are. Keep an eye out for our week-of email with more
details regarding McHacks. Happy hacking!
<br><br>
Expand Down
2 changes: 1 addition & 1 deletion assets/email/statusEmail/Declined.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@
<tr>
<td valign="top" class="headerContent"
style="-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;color:#4D4D4D;mso-table-lspace:0pt;mso-table-rspace:0pt;">
<img src="https://mchacks.ca/mchacks-long-tight.png" width="250" height="59"
<img src="https://mchacks.ca/martlet-text-13.png" width="250" height="59"
alt="Logo" title="Logo" id="headerImage" mc:label="header_image"
mc:edit="header_image" mc:allowdesigner mc:allowtext
style="-ms-interpolation-mode:bicubic;border-width:0;line-height:100%;outline-style:none;text-decoration:none;height:auto;max-width:30%;width:250px;padding-top:20px;padding-bottom:20px;margin-left:auto;margin-right:auto;display:block;" />
Expand Down
8 changes: 4 additions & 4 deletions assets/email/statusEmail/None.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@
<tr>
<td valign="top" class="headerContent"
style="-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;color:#4D4D4D;mso-table-lspace:0pt;mso-table-rspace:0pt;">
<img src="https://mchacks.ca/mchacks-long-tight.png" width="250" height="59"
<img src="https://mchacks.ca/martlet-text-13.png" width="250" height="59"
alt="Logo" title="Logo" id="headerImage" mc:label="header_image"
mc:edit="header_image" mc:allowdesigner mc:allowtext
style="-ms-interpolation-mode:bicubic;border-width:0;line-height:100%;outline-style:none;text-decoration:none;height:auto;max-width:30%;width:250px;padding-top:20px;padding-bottom:20px;margin-left:auto;margin-right:auto;display:block;" />
Expand Down Expand Up @@ -393,9 +393,9 @@
dashboard</a> to get started!
<br><br>
Applications close on <b
style="-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;font-weight: 700;">December
26th at
12:00pm ET</b> so
style="-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;font-weight: 700;">November
17th at
11:59pm ET</b> so
be sure to
click submit before then to be considered.
<br><br>
Expand Down
Loading
Loading