Skip to content

Commit c5244ee

Browse files
committed
chore: bailing if both proxy and transport auth options are used together
1 parent d3d3339 commit c5244ee

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

crates/apollo-mcp-server/src/errors.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,9 @@ pub enum ServerError {
100100

101101
#[error("Failed to index schema: {0}")]
102102
Indexing(#[from] IndexingError),
103+
104+
#[error("Proxy options used with transport auth currently not supported")]
105+
ProxyAuthNotSupported,
103106
}
104107

105108
/// An MCP tool error

crates/apollo-mcp-server/src/main.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,12 @@ async fn main() -> anyhow::Result<()> {
151151
.start();
152152

153153
match config.transport {
154-
Transport::StreamableHttp { address, port, .. } => {
154+
Transport::StreamableHttp { address, port, auth } => {
155155
if config.proxy.enabled {
156+
if auth.is_some() {
157+
anyhow::bail!(ServerError::ProxyAuthNotSupported)
158+
}
159+
156160
let url = config.proxy.url(&address, &port);
157161
let cancellation_token: CancellationToken = CancellationToken::new();
158162

0 commit comments

Comments
 (0)