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

[Question]: why i can not set defalut header as a global #3281

Closed
3 tasks done
thearithchhie opened this issue Jan 14, 2025 · 2 comments
Closed
3 tasks done

[Question]: why i can not set defalut header as a global #3281

thearithchhie opened this issue Jan 14, 2025 · 2 comments

Comments

@thearithchhie
Copy link

Bug Description

Hello Fiber Dev, why i can not set defalut header as a global

app.Use(func(c *fiber.Ctx) error {
   	c.Set("Content-Type", "application/json")
   	return c.Next()
   })

How to Reproduce

Steps to reproduce the behavior:

  1. Go to '....'
  2. Click on '....'
  3. Do '....'
  4. See '....'

Expected Behavior

Hello Fiber Dev, why i can not set defalut header as a global

app.Use(func(c *fiber.Ctx) error {
   	c.Set("Content-Type", "application/json")
   	return c.Next()
   })

Fiber Version

version 2

Code Snippet (optional)

No response

Checklist:

  • I agree to follow Fiber's Code of Conduct.
  • I have checked for existing issues that describe my problem prior to opening this one.
  • I understand that improperly formatted bug reports may be closed without explanation.
Copy link

welcome bot commented Jan 14, 2025

Thanks for opening your first issue here! 🎉 Be sure to follow the issue template! If you need help or want to chat with us, join us on Discord https://gofiber.io/discord

@thearithchhie thearithchhie changed the title 🐛 [Bug]: 🐛 [Bug]: why i can not set defalut header as a global Jan 14, 2025
@ReneWerner87
Copy link
Member

@thearithchhie should be possible, what is the problem ? which bug exists ?

if you have any questions, feel free to join our discord and ask them on the fly

@ReneWerner87 ReneWerner87 changed the title 🐛 [Bug]: why i can not set defalut header as a global [Question]: why i can not set defalut header as a global Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants