-
Notifications
You must be signed in to change notification settings - Fork 285
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Redirect fileserver towards https #4859
Conversation
82945a8
to
4181cc2
Compare
xapi-project/xen-api#4859 Signed-off-by: BenjiReis <benjamin.reis@vates.fr>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good, waiting on Benjamin to post the results of manual testing
It seems to not take the |
Because Uri is open, host is actually Uri.host, and path is actually Uri.path. A correct expression is: let dest = Uri.make ~scheme:"https" ~host ~path () |> Uri.to_string |
Should I add a |
You need a unit
|
Thanks, it seems I need a bit more coffee this morning ^^' |
"A function taking some optional arguments must also take at least one non-optional argument." |
6f4e71e
to
cddc31f
Compare
Okay so testing was successful :) This is good to go for us! |
- Add `location` to `Http.Request.Hdr` - Add `response_redirect` method to `http-svr` - When `GET` is received by the fileserver and `website-https-only` is true: - if `host` is filled in the request, redirect towards the same URI but in HTTPS - if `host` is not present, reply with a forbidden as before Solves xapi-project#4856 Signed-off-by: BenjiReis <benjamin.reis@vates.fr>
ace56b5
to
df511a3
Compare
xapi-project/xen-api#4859 Signed-off-by: BenjiReis <benjamin.reis@vates.fr>
xapi-project/xen-api#4859 Signed-off-by: BenjiReis <benjamin.reis@vates.fr>
Partial backport of xapi-project/xen-api#4859 Other part is in xcp-ng-rpms/xapi#35 Signed-off-by: BenjiReis <benjamin.reis@vates.fr>
Partial backport of xapi-project/xen-api#4859 Other part in xcp-ng-rpms/ocaml-xen-api-libs-transitional#4 Signed-off-by: BenjiReis <benjamin.reis@vates.fr>
xapi-project/xen-api#4859 Signed-off-by: BenjiReis <benjamin.reis@vates.fr>
Partial backport of xapi-project/xen-api#4859 Other part is in xcp-ng-rpms/xapi#35 Signed-off-by: BenjiReis <benjamin.reis@vates.fr>
Partial backport of xapi-project/xen-api#4859 Other part in xcp-ng-rpms/ocaml-xen-api-libs-transitional#4 Signed-off-by: BenjiReis <benjamin.reis@vates.fr>
location
toHttp.Request.Hdr
response_redirect
method tohttp-svr
GET
is received by the fileserver andwebsite-https-only
is true:host
is filled in the request, redirect towards the same URI but in HTTPShost
is not present, reply with a forbidden as beforeSolves: #4856
Signed-off-by: BenjiReis benjamin.reis@vates.fr