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

UHF-10255: Add module for X-Robots-Tag handling if helfi_proxy can't be used #783

Merged
merged 1 commit into from
Jun 28, 2024

Conversation

juho-lehmonen
Copy link
Contributor

@juho-lehmonen juho-lehmonen commented Jun 27, 2024

UHF-10255

What was done

  • Add a new module that adds the X-Robots-Tag: noindex, nofollow header when DRUPAL_X_ROBOTS_TAG_HEADER environment variable is set to true.

How to install

  • Set up Palvelukeskus
    • git checkout dev
    • make fresh shell
    • composer require drupal/helfi_platform_config:dev-UHF-10255-add-module-for-robots-header
    • drush en helfi_robots_header
  • Run make drush-cr

How to test

  • Open any page and check that the x-robots-tag header is not set.
  • Add DRUPAL_X_ROBOTS_TAG_HEADER: 1 to compose.yaml under services -> app -> environment, then run make up drush-cr
    • Reload the page. The header should be set now
  • Remove the env variable line from compose.yaml, then run make up drush-cr
    • Reload the page. The header should be gone.
  • Check that code follows our standards

Test if this breaks anything on another instance

  • Set up a second instance, doesn't matter which one, but it should have helfi_proxy enabled (for example KYMP, SOTE, etc)
  • Follow the same installation instructions, see if anything breaks
  • Follow the test instructions, see if anything breaks or something weird happens

Continuous documentation

  • This feature has been documented/the documentation has been updated

Copy link

Copy link
Contributor

@khalima khalima left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested this functionality with Palvelukeskus (without helfi_proxy) and with KYMP (with helfi_proxy). In both cases it seemed to work without any weird issues.

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

Successfully merging this pull request may close these issues.

2 participants