mirror of
https://github.com/Eugeny/tabby-web.git
synced 2025-08-14 21:31:52 +00:00
.
This commit is contained in:
@@ -8,10 +8,8 @@ export class UniversalInterceptor implements HttpInterceptor {
|
||||
constructor (private commonService: CommonService) { }
|
||||
|
||||
intercept (request: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {
|
||||
console.log(request.url)
|
||||
if (!request.url.startsWith('//') && request.url.startsWith('/')) {
|
||||
const endpoint = request.url
|
||||
console.log(this.commonService.backendURL, request.url)
|
||||
request = request.clone({
|
||||
url: `${this.commonService.backendURL}${endpoint}`,
|
||||
withCredentials: true,
|
||||
|
@@ -31,11 +31,11 @@ function start () {
|
||||
app.set('view engine', 'html')
|
||||
app.set('views', DIST_FOLDER)
|
||||
|
||||
app.get('*.*', express.static(join(DIST_FOLDER, 'static'), {
|
||||
app.use('/static', express.static(DIST_FOLDER, {
|
||||
maxAge: '1y',
|
||||
}))
|
||||
|
||||
app.get('*', (req, res) => {
|
||||
app.get(['/', '/app', '/login'], (req, res) => {
|
||||
res.render('index', { req })
|
||||
})
|
||||
|
||||
|
@@ -34,7 +34,7 @@ module.exports = {
|
||||
// libraryTarget: 'commonjs',
|
||||
path: outputPath,
|
||||
pathinfo: true,
|
||||
publicPath: '/',
|
||||
publicPath: '/static/',
|
||||
filename: '[name].js',
|
||||
chunkFilename: '[name].bundle.js',
|
||||
},
|
||||
|
Reference in New Issue
Block a user