Cool, thanks…
BTW: I’ve also a Slack channel, for faster communication when we’re both on
However, for today, I think I’ll finish
Cool, thanks…
BTW: I’ve also a Slack channel, for faster communication when we’re both on
However, for today, I think I’ll finish
I think that I should be quite embarrassed, thinking that a pathrewrite was needed to get rid of /api, turns out my configuration had a lot of misconfigurations. But I made the following work:
import { Agent } from 'https';
export default {
mode: 'universal',
/*
** Headers of the page
*/
server: {
port: 3005, // default: 3000
host: "0.0.0.0" // default: localhost
},
head: {
title: process.env.npm_package_name || '',
meta: [
{
charset: 'utf-8'
},
{
name: 'viewport',
content: 'width=device-width, initial-scale=1'
},
{
hid: 'description',
name: 'description',
content: process.env.npm_package_description || ''
}
],
link: [
{
rel: 'icon',
type: 'image/x-icon',
href: '/favicon.ico'
}
]
},
/*
** Customize the progress-bar color
*/
loading: {
color: '#fff'
},
/*
** Global CSS
*/
css: ['element-ui/lib/theme-chalk/index.css'],
/*
** Plugins to load before mounting the App
*/
plugins: ['@/plugins/element-ui', '@/plugins/dependencyContainer.ts', '@/plugins/axios', '@/plugins/auth'],
/*
** Nuxt.js dev-modules
*/
buildModules: ['@nuxt/typescript-build'],
/*
** Nuxt.js modules
*/
modules: ['@nuxtjs/pwa', ['@nuxtjs/axios', { baseURL: 'http://localhost:3005' }], '@nuxtjs/auth', '@nuxtjs/proxy', '@nuxtjs/toast'],
/*
** Build configuration
*/
build: {
transpile: [/^element-ui/],
vendor: ['axios'],
/*
** You can extend webpack config here
*/
extend: function (config, {isDev, isClient}) {
config.node = {
fs: "empty"
};
}
},
axios: {
baseURL: 'http://localhost:3005',
browserBaseURL: 'http://localhost:3005',
headers: {
'Access-Control-Allow-Origin': '*',
},
proxyHeaders: true,
proxy: true,
},
auth: {
strategies: {
keycloak: {
_scheme: 'oauth2',
authorization_endpoint: '/sirix/user/authorize',
userinfo_endpoint: false,
access_type: 'offline',
access_token_endpoint: '/sirix/token',
response_type: 'code',
token_type: 'Bearer',
token_key: 'access_token',
client_id: 'sirix',
client_secret: '8f12a099-767b-4125-bf54-14cb8a9b9f2f',
redirect_uri: 'http://localhost:3005/callback',
},
},
redirect: {
login: '/login',
callback: '/callback',
home: '/'
},
},
router: {
middleware: ['auth']
},
proxy: {
'/sirix': {
// target: 'https://localhost:9443/',
target: 'https://192.168.99.101:9443/',
pathRewrite: {'^/sirix': ''},
agent: new Agent({ rejectUnauthorized: false })
}
}
}
All the calls - including the one to the database - work now. Only that there are no databases.
Will try tomorrow evening. So, basically everything is working for you? Okay, no databases there, but if it’s not running into the catch and logging an error, that’s great
Right, I receive a 200 response to the “/sirix” call, which under the hood calls (by proxy) “/” on the server. I’m quite jubilant.
Hope it’ll work for me, too