Line | |
---|
1 | # Korero Maori Proxy Setup
|
---|
2 |
|
---|
3 | 1. Find your ASR API key and run the setup script.
|
---|
4 |
|
---|
5 | ```sh
|
---|
6 | > ./setup.sh
|
---|
7 | ```
|
---|
8 |
|
---|
9 | 2. Edit the HTML content of the `unauthorised` page so that the button redirects to your preferred location.
|
---|
10 |
|
---|
11 | ```sh
|
---|
12 | nano src/main/webapp/webContent/unauthorised.html
|
---|
13 | ```
|
---|
14 |
|
---|
15 | 3. Compile and install the WAR file.
|
---|
16 |
|
---|
17 | ```sh
|
---|
18 | > ant install
|
---|
19 | ```
|
---|
20 |
|
---|
21 | 4. Update the apache2 config with the relevant `ProxyPass` rules
|
---|
22 |
|
---|
23 | ```sh
|
---|
24 | > sudo nano /etc/apache2/sites-enabled/000-default-le-ssl.conf
|
---|
25 | > sudo nano /etc/apache2/sites-enabled/000-default.conf
|
---|
26 |
|
---|
27 | ProxyPass /gs3-koreromaori http://localhost:8383/gs3-macroniser
|
---|
28 | ProxyPassReverse /gs3-koreromaori http://localhost:8383/gs3-macroniser
|
---|
29 | ```
|
---|
30 |
|
---|
31 | 5. If `403 Forbidden` errors are observed, update the CORS filter in `web.xml` to include your root domains, and re-install.
|
---|
32 |
|
---|
33 | ```sh
|
---|
34 | > nano src/main/webapp/WEB-INF/web.xml
|
---|
35 |
|
---|
36 | <filter>
|
---|
37 | <filter-name>CorsFilter</filter-name>
|
---|
38 | <filter-class>org.apache.catalina.filters.CorsFilter</filter-class>
|
---|
39 | <init-param>
|
---|
40 | <param-name>cors.allowed.origins</param-name>
|
---|
41 | -- <param-value>http://localhost:8080</param-value> <!-- Separate values by a comma -->
|
---|
42 | ++ <param-value>http://localhost:8080,http://atea.space,https://atea.space</param-value>
|
---|
43 | </init-param>
|
---|
44 | </filter>
|
---|
45 | ```
|
---|
Note:
See
TracBrowser
for help on using the repository browser.