Vite, Axios post

Yes it works in local but not in prod :rofl:

Hi :raising_hand_man:people, I can’t make my external post work: I try many things but can’t make it work

My _redirects file

/sap/* https://theUrl/:splat 200

My netlify.toml

[build]
  command = "npm run build"
  publish = "dist"
  environment = { NODE_VERSION = "16" }

[[redirects]]
  from = "/*"
  to = "/index.html"
  status = 200

# Opting your Website out of Google's FLoC Network
[[headers]]
  for = "/*"
  [headers.values]
    Permissions-Policy = "interest-cohort=()"

My vite file

import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import { resolve } from 'path'
import vitePluginMomentToDayjs from 'vite-plugin-moment-to-dayjs';

export default defineConfig({
  plugins: [
    vue(),
    vitePluginMomentToDayjs()
  ],
  resolve: {
    alias: {
      '@': resolve(__dirname, 'src'),
    },
  },
  server: {
    open: true,
    proxy: {

      '^/sap/.*': {
        target: 'https://theUrl',
        changeOrigin: true,
        secure: false,
        rewrite: (path) => path.replace(/^\/sap/, ''),
      },
    }
  },
  compilerOptions: {
    isCustomElement: tag => {
      return /ion-icon/.test(tag)
    }
  }

})

Thanks, for help :partying_face:

We’ve followed up in your helpdesk ticket.