Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Code for Pipedream Notion data URI redirect
import validDataUrl from "valid-data-url"
export default defineComponent({
async run({ steps, $ }) {
const b64Uri = steps.trigger.event.query.uri;
if (validDataUrl(b64Uri)) {
await $.respond({
status: 302,
headers: {
"Location": b64Uri
} else {
await $.respond({
status: 400,
body: "Invalid Data URI"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment