nuxt-modules / robots

Tame the robots crawling and indexing your Nuxt site.
https://nuxtseo.com/robots
MIT License
424 stars 34 forks source link

feat: `header`, disable setting `X-Robots-Tag` header #134

Closed HADB closed 3 months ago

HADB commented 3 months ago

๐Ÿ”— Linked issue

resolves #133

โ“ Type of change

๐Ÿ“š Description

Add an option to disable setting X-Robots-Tag header.

harlan-zw commented 3 months ago

Thanks, I think there may be some runtime logic that also applies these headers. Do you think we should be covering that with this flag or should we have two separate flags?

Btw I think we we could disable this feature by default for cloudflare but I'll set up that up outside this PR.

HADB commented 3 months ago

Hi, I pushed a new commit which covers runtime header logic.

harlan-zw commented 3 months ago

Great work, thank you for the help. I'll aim to get this merged and released tomorrow.

If you have any time in the meantime to add a test it would be really appreicated.

HADB commented 3 months ago

I added a test for server response header. I have no idea how to test the generated _headers file. But it works as expected when I run generate script manually.