Invalid Host header - Dspace Angular

300 views
Skip to first unread message

Manish Kumar

unread,
Jul 5, 2024, 11:44:30 AM7/5/24
to DSpace Technical Support
Hi all,

I have used dspace angular docker image 7.6.1 and deployed on gcp kubernetes, I can see my application is running in workloads but when hitting the url it says Invalid Host header  with http status 304. 

I have not found any errors in UI logs, adding below. 
 " yarn run v1.22.19
$ yarn base-href
$ ts-node --project ./tsconfig.ts-node.json scripts/base-href.ts
Building production app config
Overriding app config with /app/config/config.yml
Unable to find env config file at /app/config/config.production.yaml
Applying environment variable DSPACE_REST_SSL with value true
Applying environment variable DSPACE_REST_HOST with value localhost
Applying environment variable DSPACE_REST_PORT with value 80
Applying environment variable DSPACE_REST_NAMESPACE with value /server
Setting baseHref to / in angular.json
$ ts-node --project ./tsconfig.ts-node.json scripts/serve.ts --host 0.0.0.0
Building production app config
Overriding app config with /app/config/config.yml
Unable to find env config file at /app/config/config.production.yaml
Applying environment variable DSPACE_REST_SSL with value true
Applying environment variable DSPACE_REST_HOST with value localhost
Applying environment variable DSPACE_REST_PORT with value 80
Applying environment variable DSPACE_REST_NAMESPACE with value /server
Option 'host' has been specified multiple times. The value '0.0.0.0' will be used.
Warning: This is a simple server for use in testing or debugging Angular applications
locally. It hasn't been reviewed for security issues.

Binding this server to an open connection can result in compromising your application or
computer. Using a different host than the one passed to the "--host" flag might result in
websocket connection issues. You might need to use "--disable-host-check" if that's the
case.
- Generating browser application bundles (phase: setup)...
Building production app config
Overriding app config with /app/config/config.yml
Unable to find env config file at /app/config/config.production.yaml
Applying environment variable DSPACE_REST_SSL with value true
Applying environment variable DSPACE_REST_HOST with value localhost
Applying environment variable DSPACE_REST_PORT with value 80
Applying environment variable DSPACE_REST_NAMESPACE with value /server
Angular config.json file generated correctly at /app/src/assets/config.json

Processing legacy "View Engine" libraries:
- angular-idle-preload [main/commonjs] (git+https://github.com/gdi2290/angular-idle-preload.git)
- ngx-sortablejs [es2015/esm2015] (https://github.com/sortablejs/ngx-sortablejs)
- ng2-file-upload [es2015/esm2015] ()
Encourage the library authors to publish an Ivy distribution.
✔ Browser application bundle generation complete.

Initial Chunk Files    
........
.......
** Angular Live Development Server is listening on 0.0.0.0:3000, open your browser on http://localhost:3000/ **


✔ Compiled successfully.
✔ Browser application bundle generation complete.

Initial Chunk Files | Names   | Raw Size
runtime.js          | runtime | 14.46 kB |

164 unchanged chunks

Build at: 2024-07-05T15:08:17.617Z - Hash: 6d19f347a4b5a931 - Time: 49841ms

✔ Compiled successfully. "


But after this nothing is coming in logs, it should print some backend connections logs seems here. I need yours help on this. What would be issue for " Invalid Host header"

However dspace backend 7.6.1 is also running and able to login through HAL Browser.

Thanks,
Manish Kumar 
Reply all
Reply to author
Forward
0 new messages