qiwi/qorsproxy

View on GitHub
src/main/js/servlet/common/status.js

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
import { StatusCodes } from 'http-status-codes'

const {
  OK,
  NO_CONTENT,
  BAD_REQUEST,
  UNAUTHORIZED,
  FORBIDDEN,
  NOT_FOUND,
  INTERNAL_SERVER_ERROR,
  SERVICE_UNAVAILABLE
} = StatusCodes

// NOTE Cloudflare's reverse proxy codes
export const REMOTE_UNKNOWN = 520
export const REMOTE_IS_DOWN = 521

export {
  OK,
  NO_CONTENT,
  BAD_REQUEST,
  UNAUTHORIZED,
  FORBIDDEN,
  NOT_FOUND,
  INTERNAL_SERVER_ERROR,
  SERVICE_UNAVAILABLE
}

export default {
  OK,
  NO_CONTENT,
  BAD_REQUEST,
  UNAUTHORIZED,
  FORBIDDEN,
  NOT_FOUND,
  INTERNAL_SERVER_ERROR,
  SERVICE_UNAVAILABLE,

  REMOTE_IS_DOWN,
  REMOTE_UNKNOWN
}