supabase / pg_net

A PostgreSQL extension that enables asynchronous (non-blocking) HTTP/HTTPS requests with SQL
https://supabase.github.io/pg_net
Apache License 2.0
213 stars 16 forks source link

pg_net doesn't support 308 redirects #87

Closed charlesloubao closed 10 months ago

charlesloubao commented 1 year ago

Bug report

Describe the bug

I have an HTTP webhook set in my supabase instance (cloud) making a call to a next.js app. The request goes through when making calls to my .vercel.app domain. But when using my domain example: domain.com, it failed. I realized it was a redirection issue when I changed the webhook URL from domain.com to www.domain.com. Vercel redirects domain.com => www.domain.com and returns 308 to the HTTP client.

To Reproduce

Steps to reproduce the behavior, please provide code snippets or a repository:

Try a request to any URL that makes a 308 redirect.

Expected behavior

A call to a URL that makes a 308 should redirect properly

Demo video

https://www.loom.com/share/33ce73d2de094113b31a43d993e0eec7

System information

Additional context

Add any other context about the problem here.

Garett-MacGowan commented 1 year ago

+1