Skip to content

Instantly share code, notes, and snippets.

@nmarley
Created March 21, 2025 15:32
Show Gist options
  • Save nmarley/029ccc589d79d0fc52a1c6771684e9ae to your computer and use it in GitHub Desktop.
Save nmarley/029ccc589d79d0fc52a1c6771684e9ae to your computer and use it in GitHub Desktop.
Cursor AI - fake the update URL so it stops auto-updating
#! /bin/bash
# I don't know what this hash is, I'm just getting it from the logs. Seems to
# be the same whether I'm coming from v0.45 or v0.47
SOME_HASH="a63aba471623a41801c50fa53f56f7c39d330ab06bb4926d53909805c61a66fe"
# VERSION=0.45.17
VERSION=0.47.8
# URL="https://api2.cursor.sh/updates/api/update/darwin/cursor/${VERSION}/a63aba471623a41801c50fa53f56f7c39d330ab06bb4926d53909805c61a66fe?http2Disabled=false"
# USER_AGENT="Cursor/0.47.8 CFNetwork/1335.0.3.1 Darwin/21.6.0"
URL="https://api2.cursor.sh/updates/api/update/darwin/cursor/${VERSION}/${SOME_HASH}?http2Disabled=false"
USER_AGENT="Cursor/${VERSION} CFNetwork/1335.0.3.1 Darwin/21.6.0"
URL="https://api.heyspeakeasy.com/updates/api/update/darwin/cursor/${VERSION}/${SOME_HASH}?http2Disabled=false"
# URL="http://api.heyspeakeasy.com/updates"
curl --include --request GET \
--http1.0 \
--header "Accept: application/json" \
--header "Accept-Language: en-US,en;q=0.9" \
--header "Accept-Encoding: gzip, deflate" \
--header "User-Agent: $USER_AGENT" \
--url "$URL"
# This is what is returned if there are updates:
#
# HTTP/1.1 200 OK
# Date: Fri, 21 Mar 2025 15:19:27 GMT
# Content-Type: application/json; charset=utf-8
# Content-Length: 139
# Connection: close
# vary: Origin
# access-control-allow-credentials: true
# access-control-expose-headers: Grpc-Status, Grpc-Message, Grpc-Status-Details-Bin, Content-Encoding, Connect-Content-Encoding, traceparent, backend-traceparent, x-amzn-trace-id, x-request-id
#
# {"url":"https://downloads.cursor.com/production/82ef0f61c01d079d1b7e5ab04d88499d5af500e3/darwin/x64/Cursor-darwin-x64.zip","name":"0.47.8"}%
# If there are no updates, this is returned:
# HTTP/1.1 204 No Content
# Date: Fri, 21 Mar 2025 15:23:17 GMT
# Connection: close
# vary: Origin
# access-control-allow-credentials: true
# access-control-expose-headers: Grpc-Status, Grpc-Message, Grpc-Status-Details-Bin, Content-Encoding, Connect-Content-Encoding, traceparent, backend-traceparent, x-amzn-trace-id, x-request-id
#
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment