-
Notifications
You must be signed in to change notification settings - Fork 2
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
Fix content loading #235
Fix content loading #235
Conversation
Vercel Previews Deployed
|
# paths: | ||
# Hello Security 👋, we are checking to make sure forked repo PR changed paths are only in content/** inside the job security-check. | ||
# We are doing this so we can also reuse this workflow for internal PRs, as pull_request_target also triggers on internal PRs. (As does pull_request) | ||
push: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rmainwork because this is file is a pull_request_target
workflow file, your changes in this PR will not go into effect in this PR. (This because security is bigger concern with pull_request_target
actions and will only update for changes on main
.) Please duplicate this workflow file into a new push/pull_request workflow file so that you can see your test runs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point! I copied the workflow into another file, pushed it and (with lots of rebasing afterward) tested it to make sure it works - it seems like it does.
df8e931
to
a998ab1
Compare
Builds were previously breaking when UDR attempted to make HTTP requests to the CDN (vercel public folder) to retrieve content. Adding the `x-vercel-protection-bypass` header should fix that
a998ab1
to
0867b58
Compare
const headers = process.env.VERCEL_URL | ||
? new Headers({ | ||
'x-vercel-protection-bypass': process.env.VERCEL_AUTOMATION_BYPASS_SECRET, | ||
}) | ||
: new Headers() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add 'use server'
to the top of the file so this is only run server-side?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added that in 4f2ecae
Just left a suggestion, but otherwise lgtm |
Sorry about closing this! It was a mistake made while refactoring the the repo-sync workflow. |
5db12c6
to
4f2ecae
Compare
Adding a 'use server' directive to this file causes 404s on the content API. This reverts commit 4f2ecae.
I'm going to merge this PR. There are issues with failing checks (or there were) that are related to the incorrect header formatting ( |
Add Vercel deployment protection bypass header to both the CI(broken link checker) and the two
fetch()
requests used to fetch internal docs content. The latter was causing HTTP requests to fail before due to the Vercel authentication page preventing access to the Vercel "CDN"(public folder) used to host and share content.Iterates on #230