set cookies in development mode
This commit is contained in:
@@ -137,6 +137,11 @@ func startWebServer(c *cli.Context) error {
|
||||
|
||||
router.GET("/healthz.json", bindApi(api.Healths.HealthStatusHandler))
|
||||
|
||||
if config.Mode == settings.MODE_DEVELOPMENT {
|
||||
devRoute := router.Group("/dev")
|
||||
devRoute.GET("/cookies", bindMiddleware(middlewares.ServerSettingsCookie(config)))
|
||||
}
|
||||
|
||||
proxyRoute := router.Group("/proxy")
|
||||
proxyRoute.Use(bindMiddleware(middlewares.JWTAuthorizationByQueryString))
|
||||
{
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<template>
|
||||
<img src="/dev/cookies" style="display: none;" v-if="!isProduction" />
|
||||
<f7-app v-bind="f7params">
|
||||
<f7-view id="main-view" class="safe-areas" main url="/"></f7-view>
|
||||
</f7-app>
|
||||
@@ -13,6 +14,7 @@ export default {
|
||||
const self = this;
|
||||
|
||||
return {
|
||||
isProduction: self.$settings.isProduction(),
|
||||
f7params: {
|
||||
name: 'ezBookkeeping',
|
||||
theme: 'ios',
|
||||
|
||||
@@ -126,6 +126,10 @@ export default defineConfig(async () => {
|
||||
port: 8081,
|
||||
strictPort: true,
|
||||
proxy: {
|
||||
'/dev': {
|
||||
target: 'http://127.0.0.1:8080/',
|
||||
changeOrigin: true
|
||||
},
|
||||
'/api': {
|
||||
target: 'http://127.0.0.1:8080/',
|
||||
changeOrigin: true
|
||||
|
||||
Reference in New Issue
Block a user