Socket
Socket
Sign inDemoInstall

@adv-ui/ij-axios-interceptor

Package Overview
Dependencies
11
Maintainers
70
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @adv-ui/ij-axios-interceptor

Axios interceptor


Version published
Maintainers
70
Install size
2.17 MB
Created

Readme

Source

Jobs Axios interceptors

Description

This is a package where some general axios interceptors can be setted to use in different projects.

Features

Intercept request regarding the tenant

The setBlockingInterceptor method purpose is to block requests depending on the tenant we provide

import AxiosInterceptor from '@adv-ui/ij-axios-interceptor'
import {FetcherFactory} from '@s-ui/domain'

const fetcher = FetcherFactory.httpFetcher({
  config: {}
})

const filterTenantPaths = [
  {
    tenant: 'infojobs',
    whiteListPaths: [{path: '/users', method: 'GET'}, {path: '/user/:id'}]
  }
]

const axiosInterceptor = new AxiosInterceptor()

axiosInterceptor.setBlockingInterceptor({
  fetcher,
  currentTenant: 'infojobs',
  filterTenantPaths
})

Release a new version

Once you have merged your changes, the @s-ui/ci tool will automatically release a new minor version for the dependency @s-ui/ij-axios-interceptor

FAQs

Last updated on 12 Sep 2023

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