yarn package upgrades, ssr update

This commit is contained in:
2023-11-15 07:00:12 +00:00
parent f1d30945c1
commit 942f92c477
18 changed files with 1800 additions and 1392 deletions

View File

@@ -9,8 +9,22 @@ DirectoryIndex noindex
RewriteRule ^/?api/(.*)$ http://tibi-server:8080/api/v1/_/demo/$1 [P,QSA,L]
# set in vhost or global in apache
#SSLProxyEngine On
#SSLProxyVerify none
#SSLProxyCheckPeerCN off
#SSLProxyCheckPeerName off
#SSLProxyCheckPeerExpire off
# Set the Host header for requests to sentry
RequestHeader set Host sentry.basehosts.de env=proxy-sentry
RequestHeader unset Authorization env=proxy-sentry
# need to update project id
RewriteRule ^/?_s(.*)$ https://sentry.basehosts.de/api/__PROJECT_ID__/envelope/$1 [P,L,E=proxy-sentry:1]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^/?(.*)$ http://tibi-server:8080/api/v1/_/demo/ssr?token=owshwerNwoa&url=/$1 [P,QSA,L]
#RewriteRule (.*) /spa.html [QSA,L]
</ifModule>

View File

@@ -1,5 +1,12 @@
import * as sentry from "./sentry"
import configClient from "../../api/hooks/config-client"
export const apiBaseURL = "/api/"
export const release = configClient.release
console.log("Release: ", release)
export const sentryDSN = "https://5063f9b5564d0fdece4e47a8e2e63672@sentry.basehosts.de/3"
export const sentryTracingOrigins = ["localhost", "project-domain.tld", /^\//]
export const sentryEnvironment: string = "local"
// need to execute early for fetch wrapping
// sentry.init(sentryDSN, sentryTracingOrigins, sentryEnvironment, release)

42
frontend/src/sentry.ts Normal file
View File

@@ -0,0 +1,42 @@
import * as Sentry from "@sentry/svelte"
let initialized = false
export const init = (dsn: string, tracingOrigins: (string | RegExp)[], environment: string, release: string) => {
if (typeof window !== "undefined") {
Sentry.init({
dsn: dsn,
tunnel: "/_s",
integrations: [
new Sentry.BrowserTracing({
tracingOrigins: tracingOrigins,
traceFetch: false,
traceXHR: false,
}),
new Sentry.Replay({
maskAllText: false,
maskAllInputs: false,
blockAllMedia: false,
networkDetailAllowUrls: [/\/api\//],
}),
],
environment: environment,
tracesSampleRate: 1.0,
debug: false,
release: release,
replaysSessionSampleRate: 1.0,
replaysOnErrorSampleRate: 1.0,
})
console.log("Sentry initialized")
initialized = true
}
}
export const currentTransaction = () => Sentry.getCurrentHub().getScope().getTransaction()
export const setUser = (user: Sentry.User) => {
if (typeof window !== "undefined" && initialized) {
user.ip_address = "{{auto}}"
Sentry.setUser(user)
}
}