Set HTTP headers in plugin?

Is it possible to set HTTP response headers in a plugin? I’m looking at the various plugins that exist, but they all seem built around having areas of the page to hook into. I also can’t find any actual documentation on this…

I’d like to set X-Robots-Tag noindex,nofollow; on unlisted topics, to actually make them unlisted…

1 Like

I think that change is good globally, submit a PR

I think we should do this regardless. I believe the last time @techapj looked this was not an easy change though.

PR submitted.

https://github.com/discourse/discourse/pull/3562

6 Likes