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

Use .localhost instead of .kblocalhost.kb.se #1284

Merged

Conversation

andersju
Copy link
Member

@andersju andersju commented Aug 9, 2023

Using kblocalhost.kb.se and id.kblocalhost.kb.se as domains for local development is an (increasingly) bad idea because in modern browsers an increasing number of features are only available in secure contexts -- essentially https://, http://127.0.0.1, http://localhost and http://*.localhost.

Among restricted features is, for example, the Web Crypto API, so we have a workaround for local development.

Let's just switch to .localhost. (Later on we might also want to use local self-signed certificates.)

To "migrate" from an old setup:

  • Stop the REST API, nuxt-app, vue-client
  • Use the corresponding branches in lxlviewer and devops unless they've already been merged
  • Change id.kblocalhost.kb.se => id.kb.se.localhost and kblocalhost.kb.se => libris.kb.se.localhost in the following files:
    • /etc/hosts
    • librisxl/secret.properties
    • lxlviewer/nuxt-app/.env
    • lxlviewer/vue-client/.env.development
    • /etc/apache2/sites-enabled/something.conf (or equivalent)
  • Import everything again: fab xl_local app.whelk.import_work_example_data
  • Restart Apache
  • In lxlviewer/vue-client/.end.development, change VUE_APP_CLIENT_ID (see chat or ask for new one)
  • Start REST API, nuxt-app, vue-client

Copy link
Contributor

@jannistsiroyannis jannistsiroyannis left a comment

Choose a reason for hiding this comment

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

Nånstans kommer detta att smälla, men det får vi nog ta när vi märker det! Bra att det blir fixat!

Copy link
Contributor

@olovy olovy left a comment

Choose a reason for hiding this comment

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

Agree, nice to have this fixed.

LGTM!

@andersju andersju merged commit d51481a into develop Aug 9, 2023
1 check passed
@andersju andersju deleted the feature/lxl-4224-localhost-instead-of-kblocalhost branch August 9, 2023 12:39
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.

3 participants