zimeon / www.openarchives.org

Content for the http://www.openarchives.org/ website
3 stars 0 forks source link

Incorrect redirect from https -> http after website move #27

Closed zimeon closed 4 months ago

zimeon commented 4 months ago

From https://groups.google.com/u/1/g/oai-pmh/c/pK9zIgEXqeA :

> curl -I https://www.openarchives.org/OAI/2.0/
HTTP/2 303
date: Thu, 18 Apr 2024 20:03:31 GMT
content-type: text/html; charset=iso-8859-1
location: http://www.openarchives.org/OAI/2.0/OAI-PMH.xsd
server: Apache/2.4.37 (Oracle Linux) OpenSSL/1.1.1k

There should not be a redirect from https to http there.

zimeon commented 4 months ago

There are redirects in the config but where is it picking up the http from?

# Provide helpful 303 redirects from the XML namespaces to useful documents
RedirectMatch 303 ^/OAI/$ /pmh/
RedirectMatch 303 ^/OAI/2.0/$ /OAI/2.0/OAI-PMH.xsd
RedirectMatch 303 ^/OAI/2.0/oai_dc/?$ /OAI/2.0/oai_dc.xsd
zimeon commented 4 months ago

Since all interaction now being forced to https at the proxy/loadbalancer level we have to change config to make the https explicit:

RedirectMatch 303 ^/OAI/$ https://www.openarchives.org/pmh/
RedirectMatch 303 ^/OAI/2.0/$ https://www.openarchives.org/OAI/2.0/OAI-PMH.xsd
RedirectMatch 303 ^/OAI/2.0/oai_dc/?$ https://www.openarchives.org/OAI/2.0/oai_dc.xsd

fixed:

> curl -I https://www.openarchives.org/OAI/2.0/
HTTP/2 303 
date: Thu, 18 Apr 2024 20:49:22 GMT
content-type: text/html; charset=iso-8859-1
location: https://www.openarchives.org/OAI/2.0/OAI-PMH.xsd
server: Apache/2.4.37 (Oracle Linux) OpenSSL/1.1.1k