Skip to content

Conversation

@nsaronson
Copy link

The SSM endpoint was returning HTTP 307 (Temporary Redirect) when handling AWS SSM start-session requests. This occurred because the static file middleware was registered before the SSM route group, causing Go's http.FileServer to intercept /ssm requests and redirect them to /ssm/ (treating it as a directory).

This fix reorders the middleware registration to ensure SSM routes are registered before the static file middleware, allowing the SSM handler to process requests directly without interference.

Changes:

  • Moved SSM route group registration before static middleware setup
  • Added comment explaining the ordering requirement

Fixes issue where AWS CLI command would fail with:
aws ssm start-session --endpoint-url "https://demo.hoop.dev/ssm"
Error: An error occurred (307) when calling the StartSession operation

📝 Description

🔗 Related Issue

Fixes #

🚀 Type of Change

  • 🐛 Bug fix (non-breaking change which fixes an issue)
  • ✨ New feature (non-breaking change which adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • 📚 Documentation update
  • 🎨 Style/UI update
  • ♻️ Code refactor
  • ⚡ Performance improvement
  • ✅ Test update
  • 🔧 Build configuration change
  • 🧹 Chore

📋 Changes Made

🧪 Testing

Test Configuration:

  • Browser(s):
  • OS:

Tests performed:

  • Unit tests pass
  • Integration tests pass
  • Manual testing completed

📸 Screenshots (if applicable)

✅ Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • New and existing unit tests pass locally with my changes
  • I have checked my code and corrected any misspellings

📄 Additional Notes


The SSM endpoint was returning HTTP 307 (Temporary Redirect) when
handling AWS SSM start-session requests. This occurred because the
static file middleware was registered before the SSM route group,
causing Go's http.FileServer to intercept /ssm requests and redirect
them to /ssm/ (treating it as a directory).

This fix reorders the middleware registration to ensure SSM routes
are registered before the static file middleware, allowing the SSM
handler to process requests directly without interference.

Changes:
- Moved SSM route group registration before static middleware setup
- Added comment explaining the ordering requirement

Fixes issue where AWS CLI command would fail with:
  aws ssm start-session --endpoint-url "https://demo.hoop.dev/ssm"
  Error: An error occurred (307) when calling the StartSession operation
@github-actions
Copy link
Contributor


Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


I have read the CLA Document and I hereby sign the CLA


You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

@sandromello
Copy link
Contributor

✅ Build Completed with Success, Version=1203.0.0-7fd97a5

@mtmr0x mtmr0x requested review from EmanuelJr and racerxdl December 18, 2025 12:10
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.

4 participants