Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't set Content-Type header #142

Closed
JurajKavka opened this issue Feb 1, 2021 · 0 comments
Closed

Can't set Content-Type header #142

JurajKavka opened this issue Feb 1, 2021 · 0 comments

Comments

@JurajKavka
Copy link

Hi

I'm trying to set Content-Type hedaer but it doesn't work and still I have application/json; charset=utf-8 in responses. I'm trying to send pdf document to user like

ctx.response.set('Content-Type', meta.mimetype || 'application/octet-stream');
ctx.response.set('Content-Disposition', `inline; filename="${meta.name}"`);
await send(ctx, file, {
  root: '/',
});

Also using seatHeader option does not work. I found this issue koajs/koa#1120 but I'm not sure if it is related...

Thank You.

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

No branches or pull requests

1 participant