-
Notifications
You must be signed in to change notification settings - Fork 952
chore: override codersdk.SessionTokenCookie in develop.sh #18991
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
Changes from all commits
9ce2437
5497686
5868b0b
6c86d8c
a2dcf61
cb6b8b3
f4e5a14
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,8 @@ source "${SCRIPT_DIR}/lib.sh" | |
|
||
GOOS="$(go env GOOS)" | ||
GOARCH="$(go env GOARCH)" | ||
CODER_AGENT_URL="${CODER_AGENT_URL:-}" | ||
DEVELOP_IN_CODER="${DEVELOP_IN_CODER:-0}" | ||
DEBUG_DELVE="${DEBUG_DELVE:-0}" | ||
BINARY_TYPE=coder-slim | ||
if [[ ${1:-} == server ]]; then | ||
|
@@ -35,16 +37,20 @@ CODER_DEV_DIR="$(realpath ./.coderv2)" | |
CODER_DELVE_DEBUG_BIN=$(realpath "./build/coder_debug_${GOOS}_${GOARCH}") | ||
popd | ||
|
||
if [ -n "${CODER_AGENT_URL}" ]; then | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We could also check if There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I forgot about that one! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should also maybe be There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I did that here above (L13) but missed it in |
||
DEVELOP_IN_CODER=1 | ||
fi | ||
|
||
case $BINARY_TYPE in | ||
coder-slim) | ||
# Ensure the coder slim binary is always up-to-date with local | ||
# changes, this simplifies usage of this script for development. | ||
# NOTE: we send all output of `make` to /dev/null so that we do not break | ||
# scripts that read the output of this command. | ||
if [[ -t 1 ]]; then | ||
make -j "${RELATIVE_BINARY_PATH}" | ||
DEVELOP_IN_CODER="${DEVELOP_IN_CODER}" make -j "${RELATIVE_BINARY_PATH}" | ||
else | ||
make -j "${RELATIVE_BINARY_PATH}" >/dev/null 2>&1 | ||
DEVELOP_IN_CODER="${DEVELOP_IN_CODER}" make -j "${RELATIVE_BINARY_PATH}" >/dev/null 2>&1 | ||
fi | ||
;; | ||
coder) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -107,6 +107,13 @@ const getMissingParameters = ( | |
return missingParameters; | ||
}; | ||
|
||
/** | ||
* Originally from codersdk/client.go. | ||
* The below declaration is required to stop Knip from complaining. | ||
* @public | ||
*/ | ||
export const SessionTokenCookie = "coder_session_token"; | ||
Comment on lines
+110
to
+115
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. TIL |
||
|
||
/** | ||
* @param agentId | ||
* @returns {OneWayWebSocket} A OneWayWebSocket that emits Server-Sent Events. | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -116,7 +116,7 @@ export default defineConfig({ | |
secure: process.env.NODE_ENV === "production", | ||
}, | ||
}, | ||
allowedHosts: [".coder"], | ||
allowedHosts: [".coder", ".dev.coder.com"], | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. review: also updated |
||
}, | ||
resolve: { | ||
alias: { | ||
|
Uh oh!
There was an error while loading. Please reload this page.
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.
I decided to try this way instead. It's a little more involved but requires less code changes in
codersdk
. I can remove the echo message if it's annoying.