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

Add a rel=alternate link header to Node GET responses #718

Closed
dannylamb opened this issue Sep 21, 2017 · 1 comment
Closed

Add a rel=alternate link header to Node GET responses #718

dannylamb opened this issue Sep 21, 2017 · 1 comment

Comments

@dannylamb
Copy link
Contributor

Add a rel=alternate link header to Node GET responses for each Media that is not a Preservation Master (e.g. derivatives).

You have access to the node and can add link headers in hook_node_view_alter like so:

function islandora_node_view_alter(&$build, EntityInterface $node, EntityViewDisplay $display) {
  $build['#attached']['http_header'] = [
    ['Link', '<http://islandora.ca>; rel="awesome"'],
  ];
}
@dannylamb
Copy link
Contributor Author

Closing since #716 takes care of this more generically.

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