Skip to content

Commit 4e549b5

Browse files
committed
chore: bailing if both proxy and transport auth options are used together
1 parent f4ea400 commit 4e549b5

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
@@ -140,8 +140,12 @@ async fn main() -> anyhow::Result<()> {
140140
.start();
141141

142142
match config.transport {
143-
Transport::StreamableHttp { address, port, .. } => {
143+
Transport::StreamableHttp { address, port, auth } => {
144144
if config.proxy.enabled {
145+
if auth.is_some() {
146+
anyhow::bail!(ServerError::ProxyAuthNotSupported)
147+
}
148+
145149
let url = config.proxy.url(&address, &port);
146150
let cancellation_token: CancellationToken = CancellationToken::new();
147151

0 commit comments

Comments
 (0)