Apollo-server: TypeError: x-original-urlis not a legal HTTP header value

Created on 8 May 2020  路  2Comments  路  Source: apollographql/apollo-server

Hi everyone.
I am uing apollo-server-azure-functions in azure functions, it was working until 5/7 ,but it is not working now.
I wrote code and deploy function again, but it didn't work,I am not sure why I am getting this error.
Does anyone has seen this error same like me?

鎴湒 2020-05-08 涓嬪崍4 53 17

Most helpful comment

The Azure team pushed an update out to the Azure Function Apps infrastructure (apparently relating to the filesystem), which adds a x-ms-privatelink-id header, which includes a new line in it - which is invalid.

I resolved this by putting a line of code within the function handler, before the apollo library takes over:

delete req.headers['x-ms-privatelink-id'];

(a more complete example:)

const { ApolloServer, gql } = require('apollo-server-azure-functions');

const server = new ApolloServer({
  // ... all of your apollo server goodness
});

const handler = server.createHandler();

module.exports = (context, req) => {
  delete req.headers['x-ms-privatelink-id'];
  handler(context, req);
};

I've had a support ticket open with them for over 10 days now, and they still haven't explained why this happened, and when a patch will be pushed out. All they've said is that it was an update to the filesystem. I will update this thread with any information I get back from them.

All 2 comments

The Azure team pushed an update out to the Azure Function Apps infrastructure (apparently relating to the filesystem), which adds a x-ms-privatelink-id header, which includes a new line in it - which is invalid.

I resolved this by putting a line of code within the function handler, before the apollo library takes over:

delete req.headers['x-ms-privatelink-id'];

(a more complete example:)

const { ApolloServer, gql } = require('apollo-server-azure-functions');

const server = new ApolloServer({
  // ... all of your apollo server goodness
});

const handler = server.createHandler();

module.exports = (context, req) => {
  delete req.headers['x-ms-privatelink-id'];
  handler(context, req);
};

I've had a support ticket open with them for over 10 days now, and they still haven't explained why this happened, and when a patch will be pushed out. All they've said is that it was an update to the filesystem. I will update this thread with any information I get back from them.

I have received an update from the support agent I was in contact with.

Our Product Group confirmed a patch is being rolled out on the instances affected by this issue, it will be available on all instances in 2.5 weeks, we apologize for any problem this might have cause to you.

Was this page helpful?
0 / 5 - 0 ratings