denoland / denoland/deploy_feedback

Recursive requests and `loop detected`

Open
#187 9 comments 4 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
79
Forks
5
PR merge metrics
No merged PRs in 30d

Description

At the moment, recursive requests to a Deno Deploy instance are blocked. This prevents interesting use cases like allowing an SSR framework to call an internal route, and render the correct content.

Ideally, the same code would work in browser as well as Deno Deploy. Right now, it only works in browser.

Mock code:

```js
const Content = () => {
const { data, error } = useSWR('test', fetcher);
return

{data.title}

;
};

const fetcher = () =>
fetch(
`https://my_deno_deploy_url/api/test`,
).then((data) => data.json());
```

This works fine when used locally with the Deno CLI, as well as in the browser (during client side navigation).

But when requesting the route directly from Deno Deploy, I get this error:

`508: Loop Detected (LOOP_DETECTED)\n\nRecursive requests to the same deployment cannot be processed.`

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the mock fetch against a Deno Deploy route, comparing direct requests with local Deno CLI and browser navigation. Done means recursive requests to the same deployment no longer return LOOP_DETECTED while the existing local and browser behavior remains working.

Written by the indexing model from the issue text.

Assessment

Tech stack
deno, javascript
Domain
api, backend, cloud
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.