Closed jobee closed 5 years ago
I came up with this workaround, please let me know whats your thoughts on that. Was there a reason why you have skipped the default fusion response head?
# Override.Ajaxify.fusion
root.ajaxify.renderer = Psmb.Ajaxify:RendererWithProperResponseHead
prototype(Psmb.Ajaxify:RendererWithProperResponseHead) < prototype(Neos.Fusion:Http.Message) {
httpResponseHead.headers {
X-Robots-Tag = 'noindex, follow'
}
content = Psmb.Ajaxify:Renderer
}
Makes sense! I think it would be good to enable it by default. Could you create a PR?
I will provide a PR, yes.
Any objections on the prototype naming Psmb.Ajaxify:RendererWithProperResponseHead
?
Sounds a bit weird :) Maybe Psmb.Ajaxify:UnindexedResponse
?
Or you could just do:
root.ajaxify.renderer = Neos.Fusion:Http.Message {
httpResponseHead.headers {
X-Robots-Tag = 'noindex, follow'
}
content = Psmb.Ajaxify:Renderer
}
you are right, no need for an extra prototype
In general having an extra prototype allows for safer extensibility at a later point, don't know if it's really justified here... Though one might want to change the tag to e.g. noindex, nofollow
for example, and it would be better to override it based on prototype, and not just fusion path (root.ajaxify.renderer...
)...
ah good point, extra prototype then PR is created
Hey @dimaip is there any chance to easily modify the response header in your
Psmb.Ajaxify:Renderer
? I would suggestX-Robots-Tag: noindex, follow
, what do you think?