Skip to content
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 /forums to point at the Discord documentation #25

Merged
merged 2 commits into from Nov 8, 2022

Conversation

sedders123
Copy link
Member

@sedders123 sedders123 commented Oct 21, 2022

Summary

We no longer use our own forums, instead a Discord server.

Code review

Testing

  • applied the configuration locally
  • manually validated the new behaviour
$ curl -Ik https://sr-vm/forum ; curl -Ik https://sr-vm/forum/ ; curl -Ik https://sr-vm/forums ; curl -Ik https://sr-vm/forums/
HTTP/2 302 
server: nginx/1.18.0 (Ubuntu)
date: Sat, 22 Oct 2022 09:19:24 GMT
content-type: text/html
content-length: 154
location: https://sr-vm/docs/team_admin/discord
x-frame-options: SAMEORIGIN

HTTP/2 302 
server: nginx/1.18.0 (Ubuntu)
date: Sat, 22 Oct 2022 09:19:25 GMT
content-type: text/html
content-length: 154
location: https://sr-vm/docs/team_admin/discord
x-frame-options: SAMEORIGIN

HTTP/2 302 
server: nginx/1.18.0 (Ubuntu)
date: Sat, 22 Oct 2022 09:19:25 GMT
content-type: text/html
content-length: 154
location: https://sr-vm/docs/team_admin/discord
x-frame-options: SAMEORIGIN

HTTP/2 302 
server: nginx/1.18.0 (Ubuntu)
date: Sat, 22 Oct 2022 09:19:25 GMT
content-type: text/html
content-length: 154
location: https://sr-vm/docs/team_admin/discord
x-frame-options: SAMEORIGIN
TASK [srobo-nginx : Copy our configuration] *************************************
--- before: /etc/nginx/nginx.conf
+++ after: /home/peterjclaw/.ansible/tmp/ansible-local-1361047yku9np0/tmp93h90qmn/nginx.conf
@@ -74,11 +74,6 @@
     #  proxy_pass https://patience.studentrobotics.org/ide/;
     #}
 
-    location /forum/ {
-      # proxy_pass https://patience.studentrobotics.org/forum/;
-      return 307 /docs/team_admin/discord;
-    }
-
     #location /docs/python/ {
     #  proxy_pass https://patience.studentrobotics.org/docs/python/;
     #}
@@ -173,6 +168,9 @@
     rewrite ^/password             /userman/ permanent;
     rewrite ^/rules                /docs/rules/ permanent;
 
+    # We now use Discord instead of a self hosted forum
+    rewrite ^/forums?              /docs/team_admin/discord redirect;
+
     # The runbook has replaced trac
     rewrite ^/trac                 /runbook/ permanent;
 

changed: [monty.studentrobotics.org]

@@ -230,6 +230,9 @@ http {
rewrite ^/pbv4 /docs/kit/power_board redirect;
rewrite ^/sbv4 /docs/kit/servo_board redirect;

# We now use Discord instead of a self hosted forum
rewrite ^/forums /docs/team_admin/discord redirect;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Issue: Looking at the commented out code (which should probably be removed), /forum was the path

Suggested change
rewrite ^/forums /docs/team_admin/discord redirect;
rewrite ^/forum /docs/team_admin/discord redirect;

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I got /forums from the current interactive troubleshooter. Maybe we should do both?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense to me!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: /forum/ does already redirect, we should probably tidy that.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fc6b1dd solves all of these.

@PeterJCLaw PeterJCLaw merged commit 1c39aeb into master Nov 8, 2022
@PeterJCLaw PeterJCLaw deleted the use-discord-instead-of-forums branch November 8, 2022 19:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants