Socket
Socket
Sign inDemoInstall

hapi-domainculture

Package Overview
Dependencies
25
Maintainers
5
Versions
11
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    hapi-domainculture

Hapijs, domain culture plugin - this plugin will support the different markets and the language


Version published
Weekly downloads
1
Maintainers
5
Install size
1.73 MB
Created
Weekly downloads
 

Readme

Source

Build
Status

hapi-domainculture

Domain Culture for Hapi.js

WHY?

We need to be able to support multi domain and languages

How?

{
  register: require('hapi-domainculture'),
  options: {
    white_list: {
      com: {
        cultures: ['en-US', 'fr-CA'],
        default: 'en-US'
      },
      commx: {
        cultures: ['es-MX', 'en-US'],
        default: 'es-MX'
       }
    }, // white_list is required
    query_params: {
      culture: 'culturequery', // defaults to "culture"
      domain: 'domainquery', // defaults to "domain"
      ignore: true // If ignore is true, no queryparams will be checked
    },
    headers: {
      domain: 'domain', // optional, defaults to "domain"
      culture: 'culture' // optional, defaults to "Accept-Language"
    },
    default: 'com' // Default domain to use. required.
  }
}

Checkout the test directory for more examples

Keywords

FAQs

Last updated on 10 Aug 2017

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc