medusa-plugin-ip-lookup

1.2.9 • Public • Published

ipstack (IP Lookup)

Automatically detect the region and location of your customer using ipstack.

Medusa Website | Medusa Repository

Features

  • Look up the location of your customer using ipstack.
  • Provides a middleware that can be added to any request to set the region and country of a cart.
  • Provides a service that can be used across codebase to detect the location of a user using their IP.

Prerequisites


How to Install

1. Run the following command in the directory of the Medusa backend:

npm install medusa-plugin-ip-lookup

2. Set the following environment variable in .env:

IPSTACK_ACCESS_KEY=<YOUR_ACCESS_KEY>

3. In medusa-config.js add the following at the end of the plugins array:

const plugins = [
  // other plugins...
  {
    resolve: `medusa-plugin-ip-lookup`,
    options: {
      access_token: process.env.IPSTACK_ACCESS_KEY,
    },
  },
]

Test the Plugin

You can use the IpLookupService service to look up the location of an IP, or use the middleware preCartCreation on any route.

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
2.0.0-202303202103310canary
1.2.9-snapshot-202407180830160snapshot
1.2.9-preview-202405051158070preview
1.2.9-next-202405051146100next
1.2.8-beta-202306191703490beta
1.2.6-rc.00rc
1.2.2-test.00test
1.2.2-test-release.00test-release
1.2.2-swap-prod-search-202212161018230swap-prod-search
1.2.2-staging-202212201103090staging
1.2.2-nxt.00nxt
1.2.2-next-1-3-6.00next-1-3-6
1.2.2-alpha.00alpha
1.2.2-alp.00alp
1.2.1-fix-1749.2250fix-1749
1.2.1-dev-c76e23.2370dev-c76e23
1.1.20-dev.3800dev
1.1.14-meilis.490meilis
1.1.14-meili.490meili
1.2.952latest

Version History

VersionDownloads (Last 7 Days)Published
1.2.952
1.2.9-snapshot-202407180830160
1.2.9-preview-202405051158070
1.2.9-next-202405051146100
1.2.9-next-202404301214020
1.2.9-snapshot-202404261122140
1.2.9-next-202401081455100
1.2.9-snapshot-202401081326340
1.2.9-snapshot-202401081259190
1.2.9-snapshot-202401081236370
1.2.9-snapshot-202401081000130
1.2.8-beta-202306191703490
1.2.8-beta-202306191652310
1.2.8-snapshot-202306191156040
1.2.8-snapshot-202306191026370
1.2.8-beta-202306181939380
1.2.8-snapshot-202306181339080
1.2.811
1.2.8-next-202306171709150
1.2.8-snapshot-202306171626340
1.2.8-snapshot-202306161514040
1.2.8-snapshot-202306161206230
1.2.8-snapshot-202306161123080
1.2.8-next-202306160938020
1.2.8-snapshot-202306160900440
1.2.8-snapshot-202306160848590
1.2.8-snapshot-202306160752510
1.2.8-snapshot-202306160745140
1.2.8-snapshot-202306160737440
1.2.8-snapshot-202306160727350
1.2.8-snapshot-202306160725120
1.2.8-snapshot-202306160644420
1.2.8-snapshot-202306152047470
1.2.8-snapshot-202306151936030
1.2.8-snapshot-202306151913360
1.2.8-snapshot-202306151826210
1.2.8-next-202306151750340
1.2.8-snapshot-202306151436010
1.2.8-snapshot-202306151228000
1.2.8-snapshot-202306151203130
1.2.8-snapshot-202306151034010
1.2.8-snapshot-202306141624310
1.2.8-snapshot-202306141549060
1.2.8-snapshot-202306141502180
1.2.8-snapshot-202306141408080
1.2.8-next-202306141334560
1.2.8-snapshot-202306141258190
1.2.8-next-202305300753450
1.2.70
1.2.7-next-202304261553000
1.2.7-snapshot-202304261015500
1.2.7-next-202304251118100
1.2.7-next-202304241806190
1.2.7-next-202304241156470
1.2.7-next-202304241136190
1.2.7-next-202304231128040
1.2.7-snapshot-202304211112230
1.2.7-snapshot-202304201606190
1.2.7-snapshot-202304201536150
1.2.7-snapshot-202304201444240
1.2.7-snapshot-202304201431260
1.2.7-snapshot-202304201359430
1.2.7-snapshot-202304201157170
1.2.7-next-202304201112380
1.2.7-next-202304201038430
1.2.7-next-202304201023560
1.2.60
1.2.6-rc.00
1.2.6-next-202303240758230
1.2.6-next-202303230834460
1.2.6-next-202303222039450
1.2.6-ci-issue-202303221902220
1.2.6-next-202303221200580
2.0.0-next-202303220943120
2.0.0-next-202303220938500
2.0.0-next-202303211900300
2.0.0-next-202303211751130
2.0.0-next-202303211455350
2.0.0-202303202103310
2.0.0-snapshot-202303201729400
2.0.0-next-202303192033510
2.0.0-next-202303190956590
2.0.0-next-202303171523500
2.0.0-next-202303170922430
2.0.0-next-202303161816320
2.0.0-next-202303161806170
2.0.0-next-202303161553530
2.0.0-next-202303161535230
2.0.0-next-202303161520190
2.0.0-next-202303161446190
2.0.0-next-202303160953010
2.0.0-next-202303160920430
2.0.0-next-202303160858340
2.0.0-next-202303160838060
2.0.0-next-202303160813160
2.0.0-next-202303151756090
2.0.0-next-202303151515580
2.0.0-next-202303151225100
2.0.0-next-202303151204480
2.0.0-next-202303151135070
2.0.0-next-202303151122080
2.0.0-next-202303150917490
2.0.0-next-202303141619100
2.0.0-next-202303141113260
2.0.0-next-202303141049200
2.0.0-next-202303141025240
2.0.0-next-202303140959260
2.0.0-next-202303140940410
2.0.0-next-202303140908340
2.0.0-next-202303131805330
2.0.0-snapshot-202303131754430
2.0.0-next-202303131735020
2.0.0-snapshot-202303131628170
2.0.0-next-202303131426340
2.0.0-next-202303131412480
2.0.0-next-202303131307000
2.0.0-next-202303131227580
2.0.0-next-202303121208360
2.0.0-next-202303120849230
2.0.0-next-202303101447440
2.0.0-next-202303101413560
2.0.0-next-202303101345220
2.0.0-next-202303101216040
1.2.6-next-202303101019120
1.2.6-next-202303100942180
1.2.6-next-202303091732290
1.2.6-next-202303091722030
1.2.6-next-202303091712180
1.2.6-next-202303091548300
1.2.6-next-202303091436340
1.2.6-next-202303091210320
1.2.6-snapshot-202303090821120
1.2.6-next-202303081601140
1.2.6-next-202303081545320
1.2.6-next-202303081513560
1.2.6-next-202303081241360
1.2.6-202303072000250
1.2.6-202303071956090
1.2.6-next-202303071915090
1.2.6-next-202303071853320
1.2.6-next-202303071846310
1.2.6-next-202303071615300
1.2.6-next-202303071459210
1.2.6-next-202303071347360
1.2.6-snapshot-202303071317420
1.2.6-snapshot-202303071258540
1.2.6-snapshot-202303071247040
1.2.6-next-202303071235020
1.2.6-next-202303071224070
1.2.6-next-202303071216370
1.2.6-next-202303071156340
1.2.6-next-202303071059470
1.2.6-next-202303070938280
1.2.6-next-202303070908540
1.2.6-next-202303061611010
1.2.6-next-202303061453410
1.2.6-next-202303051722070
1.2.6-next-202303051521300
1.2.6-next-202303041442070
1.2.6-next-202303031106000
1.2.6-next-202303030914310
1.2.6-snapshot-202303022109240
1.2.6-next-202303021707240
1.2.6-next-202303021537210
1.2.6-snapshot-202303021521380
1.2.6-snapshot-202303021511150
1.2.6-next-202303011803290
1.2.6-next-202303011737460
1.2.6-next-202303011718370
1.2.6-next-202302281823320
1.2.6-next-202302281748300
1.2.6-next-202302281613240
1.2.6-next-202302281532340
1.2.6-next-202302281029010
1.2.6-next-202302280947230
1.2.6-next-202302280853140
1.2.6-next-202302261247360
1.2.6-next-202302261212120
1.2.6-next-202302240851280
1.2.6-next-202302231613410
1.2.6-next-202302231336030
1.2.6-next-202302221644100
1.2.6-next-202302221631160
1.2.6-next-202302221547470
1.2.6-next-202302221447550
1.2.6-next-202302211615550
1.2.6-next-202302211024170
1.2.6-snapshot-202302151450500
1.2.5-next-202302141632050
1.2.50
1.2.5-next-202302141150500
1.2.5-snapshot-202302141026320
1.2.5-next-202302140956390
1.2.5-next-202302140850070
1.2.5-next-202302140828390
1.2.5-snapshot-202302140805550
1.2.5-next-202302131757540
1.2.5-next-202302131703300
1.2.5-next-202302131626070
1.2.5-next-202302131539000
1.2.5-next-202302131533040
1.2.5-snapshot-202302131048470
1.2.5-snapshot-202302121100420
1.2.5-next-202302101539180
1.2.5-snapshot-202302101423200
1.2.5-snapshot-202302101204480
1.2.5-next-202302100831090
1.2.5-next-202302091656320
1.2.5-snapshot-202302091145120
1.2.40
1.2.4-next-202302081806190
1.2.4-next-202302081704210
1.2.4-next-202302081636270
1.2.4-next-202302081306180
1.2.4-next-202302081241220
1.2.4-next-202302081217260
1.2.4-snapshot-202302080951340
1.2.4-next-202302071820040
1.2.4-snapshot-202301261856220
1.2.30
1.2.3-next-202301181643430
1.2.3-next-202301181233190
1.2.3-next-202301180951280
1.2.3-next-202301180923550
1.2.3-next-202301171519330
1.2.3-next-202301171426300
1.2.3-next-202301162322520
1.2.3-next-202301161925580
1.2.3-next-202301161836330
1.2.3-next-202301161604270
1.2.3-snapshot-202301161038160
1.2.3-next-202301160902180
1.2.3-next-202301151909160
1.2.3-next-202301151841240
1.2.3-next-202301151619240
1.2.2-next-202212221455130
1.2.20
1.2.2-next-202212221355300
1.2.2-next-202212221225230
1.2.2-next-202212221038070
1.2.2-next-202212220948580
1.2.2-next-202212220938320
1.2.2-next-202212211413550
1.2.2-next-202212202129190
1.2.2-next-202212201741590
1.2.2-next-202212201126030
1.2.2-staging-202212201103090
1.2.2-staging-202212200911210
1.2.2-staging-202212200905270
1.2.2-staging-202212191909000
1.2.2-staging-202212191443270
1.2.2-staging-202212190853180
1.2.2-staging-202212181915510
1.2.2-staging-202212161919580
1.2.2-staging-202212161120470
1.2.2-swap-prod-search-202212161018230
1.2.2-staging-202212160926020
1.2.2-staging-202212151916510
1.2.2-snapshot-202212151501570
1.2.2-staging-202212151311090
1.2.2-snapshot-202212151144060
1.2.2-staging-202212150813020
1.2.2-staging-202212150750540
0.0.0-snapshot-202210051454370
0.0.0-snapshot-202210051051170
1.2.2-alp.00
1.2.2-alpha.00
1.2.2-test-release.00
1.2.2-test.00
1.2.2-nxt.00
1.2.2-next-1-3-6.00
1.2.2-next.00
2.0.0-next.00
1.2.1-nxt.1290
1.2.1-nxt.1300
1.2.10
1.2.1-export-api.1080
1.2.1-next.1080
1.2.1-dev-c76e23.2370
1.2.1-next.1010
1.2.1-next.1000
1.2.1-next.990
1.2.1-fix-1749.2250
1.2.1-next.440
1.2.1-next.410
1.2.1-next.350
1.2.1-next.270
1.2.1-next.260
1.2.1-next.240
1.2.1-next.140
1.2.00
1.1.21-next.00
1.1.200
1.1.20-next.2430
1.1.20-dev.3800
1.1.20-dev.3770
1.1.20-alpha.2020
1.1.20-dev.3710
1.1.20-alpha.700
1.1.190
1.1.18-next.00
1.1.16-next.190
1.1.15-meilis.00
1.1.14-meilis.490
1.1.14-meili.490
1.1.14-alpha.490
1.1.150
1.1.140
1.1.14-next.520
1.1.14-next.510
1.1.14-next.480
1.1.130
1.1.120
1.1.110
1.1.9-next.160
1.1.9-alpha.90
1.1.100
1.1.90
1.1.9-next.100
1.1.9-next.90
1.1.9-next.70
1.1.80
1.1.5-next.00
1.1.30
1.1.20
1.1.1-next.1050
1.1.1-next.1040
1.1.1-alpha.570
1.1.00
1.0.12-alpha.8660
1.0.12-alpha.8010
1.0.12-alpha.7880
1.0.12-alpha.7870
1.0.12-alpha.7860
1.0.110
1.0.100
1.0.10
1.0.00
1.0.0-y.250
1.0.0-alpha.70
1.0.0-alpha.60
1.0.0-alpha.30
1.0.0-alpha.10
1.0.0-alpha.00
1.0.0-y.240
1.0.0-y.200
1.0.0-alpha.260
1.0.0-alpha.210

Package Sidebar

Install

npm i medusa-plugin-ip-lookup

Weekly Downloads

63

Version

1.2.9

License

MIT

Unpacked Size

45.4 kB

Total Files

5

Last publish

Collaborators

  • sebrindom
  • oliverjuhl