I’ve got an odd question. Are qovery inbound requests treated differently?
For some reason, the same exact app with the same exact Dockerfile works correctly on Heroku but on Qovery a header that’s added at runtime (from the frontend) is passed to the request but for some reason, the backend does not have that header while is does (as expected) on the Heroku counterpart
specify here your dockerfile content
# Use the official lightweight Node.js 14 image.
# https://hub.docker.com/_/node
FROM node:14-alpine
# Create and change to the app directory.
WORKDIR /usr/src/app
# Declare env variables.
ENV PORT 80
ENV HOST 0.0.0.0
# Copy application dependency manifests to the container image.
# A wildcard is used to ensure both package.json AND package-lock.json are copied.
# Copying this separately prevents re-running npm install on every code change.
COPY package*.json ./
# Install dependencies
RUN yarn
# Copy local code to the container image.
COPY . ./
# Expose the port
EXPOSE 80
# Build the application
RUN yarn build
# Run the web service on container startup.
CMD [ "yarn", "start:prod" ]
At the moment, the Qovery load balancer is filtering non-standard HTTP header.
Can you let me know which HTTP header you are trying to add in your request so I can take a look ?
Hello there, first of all, thank you for taking the time to look into this Q.
As for the header, it is company_id, but custom headers are very common so this would be a recurring issue maybe? Can we get a small warning at the build time or in the docs?
Yeah, it is what I thought. I haven’t looked in details what we filter or not, but non-standard HTTP header must start by X-xxx to advertise that this is a custom header.
As is, there is no way that our Load Balancer is going to forward header company_id as it does not follow this convention.
We plan later to add settings for allowing this kind of behavior, but for now it is not planned in a short term.
Going to check if we forward header starting by X-xxx
It does solve my issue does not look like a solution thought. Changing the code due to the host and even more with Docker seems like it shouldn’t be the case.