Skip to content

docs: document signed URL pattern lookup opt-out#67

Open
0xtlt wants to merge 1 commit into
adonisjs:mainfrom
0xtlt:docs/signed-url-disable-route-lookup
Open

docs: document signed URL pattern lookup opt-out#67
0xtlt wants to merge 1 commit into
adonisjs:mainfrom
0xtlt:docs/signed-url-disable-route-lookup

Conversation

@0xtlt

@0xtlt 0xtlt commented Jul 6, 2026

Copy link
Copy Markdown

🔗 Linked issue

Code PR: adonisjs/http-server#129
Discussion: https://github.com/orgs/adonisjs/discussions/5126

❓ Type of change

  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • 👌 Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

📚 Description

This PR documents how to generate signed URLs from route patterns without performing a route lookup.

It adds an example for using signedUrlFor with disableRouteLookup: true, matching the behavior added in adonisjs/http-server#129.

Example:

signedUrlFor('/files/:key', { key: 'invoice.pdf' }, {
  disableRouteLookup: true,
  prefixUrl: 'https://example.com',
  qs: {
    download: true,
  },
})

When disableRouteLookup is enabled, the first argument is parsed as a route pattern and signed directly. Regular signedUrlFor calls still use route lookup and keep their route-name type safety.

📝 Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant