Skip to content

Problems with POST on Firebase #445

@PeWu

Description

@PeWu

I don't know if this is a cors-anywhere, cors-server or Firebase issue.

I'm trying to set up a proxy on Firebase using https://github.com/isoaxe/cors-server and I'm having trouble proxying POST requests. The main goal is to make my project (https://pewu.github.io/topola-viewer/) work again with a new proxy after Heroku free tier has been turned down.

Here is what I was able to destil using cors-server running on Firebase.

This works:

curl -H "Content-Type: application/json" -X POST https://postman-echo.com/post -d test

This works:

curl https://proxy-m4bvvb54la-uc.a.run.app/https://postman-echo.com/post  -H "Origin: http://localhost:3000" -X POST

This doesn't work:

curl https://proxy-m4bvvb54la-uc.a.run.app/https://postman-echo.com/post  -H "Origin: http://localhost:3000" -X POST -d test

Stops working after adding -d test

Log in Firebase:

The request has been terminated because it has reached the maximum request timeout. To change this limit, see https://cloud.google.com/run/docs/configuring/request-timeout

Just from this log it's not possible to deduce whether the timeout was caused by cors-anywhere, cors-server or Firebase. I don't expect postman-echo.com to time out. Anyway, the problem appears not only with postman-echo.com.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions