mirror of
https://gitlab.com/openconnect/ocserv.git
synced 2026-08-08 09:21:48 +08:00
/svc handler: add the owasp headers for consistency
Signed-off-by: Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
This commit is contained in:
@@ -71,6 +71,10 @@ int get_svc_handler(worker_st *ws, unsigned int http_ver)
|
|||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|
||||||
|
ret = add_owasp_headers(ws);
|
||||||
|
if (ret < 0)
|
||||||
|
goto fail;
|
||||||
|
|
||||||
/* end of headers */
|
/* end of headers */
|
||||||
ret = cstp_puts(ws, "\r\n");
|
ret = cstp_puts(ws, "\r\n");
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
|
|||||||
@@ -111,6 +111,11 @@ results=$(LD_PRELOAD=libsocket_wrapper.so curl -I -X GET -s https://$ADDRESS:$PO
|
|||||||
CheckHeaders "$results"
|
CheckHeaders "$results"
|
||||||
echo "ok"
|
echo "ok"
|
||||||
|
|
||||||
|
echo -n "Testing /svc ... "
|
||||||
|
results=$(LD_PRELOAD=libsocket_wrapper.so curl -I -X GET -s https://$ADDRESS:$PORT/svc --insecure)
|
||||||
|
CheckHeaders "$results"
|
||||||
|
echo "ok"
|
||||||
|
|
||||||
cleanup
|
cleanup
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|||||||
Reference in New Issue
Block a user