VandyHacks/vhl.ink

short links generated but not resolving

Closed this issue · 2 comments

Firstly, thanks for this cool project. My first time deploying to CF using github.

Deployment to CF was successful. I can access the worker on my subdomain test.jatx50.io.

POST seems to work:

curl --location --request POST "https://test.jatx50.io" \
    -H "x-preshared-key: ${SECRET_KEY}" \
    -H "Content-Type: application/x-www-form-urlencoded" \
    --data-urlencode "url=https://github.com/rinkjames/vhl.ink" \
    --data-urlencode "path=test"
https://github.com/rinkjames/vhl.ink available at https://test.jatx50.io/test

GET works:

curl --location --request GET "https://test.jatx50.io" \
-H "x-preshared-key: ${SECRET_KEY}"
test
test1

DELETE doesn't seem to work, it just hangs:

curl --location --request DELETE "https://test.jatx50.io/test1" \
    -H "x-preshared-key: ${SECRET_KEY}"

Most importantly, test.jatx50.io/test doesn't redirect to github.com/rinkjames/vhl.ink, it hangs for a while then returns a 523 error. I have test set up in my DNS as a AAAA record that points to 100:: — is this wrong? Worker route is set to https://test.jatx50.io https://test.jatx50.io/*.

Seems I may have solved my own issue. I don't have an ANALYTICS_URL secret and I noticed this line in the script just before returning the redirect: event.waitUntil(fetch(ANALYTICS_URL, analyticsReq));. Commenting out the analytics code seems to have fixed things for me. Will keep an eye on https://github.com/VandyHacks/vhl.ink-viz for new developments and maybe I can add the analytics back at some stage. GL :)

Seems I may have solved my own issue. I don't have an ANALYTICS_URL secret and I noticed this line in the script just before returning the redirect: event.waitUntil(fetch(ANALYTICS_URL, analyticsReq));. Commenting out the analytics code seems to have fixed things for me. Will keep an eye on https://github.com/VandyHacks/vhl.ink-viz for new developments and maybe I can add the analytics back at some stage. GL :)

thanks! that's good to hear, I was trying to look for what might have caused it. I think we should update the documentation for the repo since we ended up adding analytics fairly recently. Thanks for using vhl.ink!