Skip to content

Conversation

@soyuka
Copy link
Contributor

@soyuka soyuka commented Sep 28, 2025

This uses github.com/soyuka/grpcweb instead of improbable-eng/grpc-web as caddy already has the whole http layer.

Copy link
Owner

@mholt mholt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I love deleting code. Thanks for the improvement!!

Copy link
Owner

@mholt mholt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Forgot something

go.mod Outdated
)

replace (
github.com/soyuka/grpcweb => ../../projects/grpcweb
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, but before we can merge, the go.mod will need to be fixed.

@soyuka
Copy link
Contributor Author

soyuka commented Oct 8, 2025

I think we should completely drop the websocket code as it is not supported nor recommended by grpcweb see https://github.com/grpc/grpc-web/blob/70268fa6e2e1c31949305bd6dc14098c821fef58/doc/streaming-roadmap.md?plain=1#L25

@mholt
Copy link
Owner

mholt commented Oct 9, 2025

I'm good with removing it; I don't know anyone using that feature, and we're not bound to compatibility guarantees here (yet) since we clearly document this as experimental and subject to change.

Anyway, this LGTM, or if we want to remove websockets now I can wait to merge this until that is ready 👍

@soyuka
Copy link
Contributor Author

soyuka commented Oct 13, 2025

I will test that and report :)

@mholt
Copy link
Owner

mholt commented Oct 13, 2025

Great! It's looking good now. Let me know when you're ready to merge.

@soyuka
Copy link
Contributor Author

soyuka commented Oct 13, 2025

Tested at https://github.com/soyuka/caddy-grpc/tree/main/testdata

Basically with github.com/soyuka/caddy-grpc you can have your grpc server directly handled by caddy (globally the same as with frankenphp-grpc but without php ^^):

{
    grpc {
        address :50051
    }
}

localhost {
    route {
        grpc_web
        reverse_proxy h2c://127.0.0.1:50051
    }
}

@mholt mholt merged commit 664ac9d into mholt:master Oct 13, 2025
@mholt
Copy link
Owner

mholt commented Oct 13, 2025

Awesome, lgtm. Thanks again!!

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.

2 participants