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

Refactor SitemapController and SitemapServiceProvider to allow for default sitemap file name and update the route to only accept requests for the specific sitemap.xml file. #13

Merged
merged 3 commits into from
Jul 7, 2024

Conversation

thejmitchener
Copy link
Member

@thejmitchener thejmitchener commented Jul 7, 2024

Refactors the SitemapController and SitemapServiceProvider to enhance the handling of sitemap files.

In SitemapController.php, the __invoke method now accepts a nullable $filename parameter, with a default value of 'sitemap.xml'. This change allows for a default sitemap file name to be used if no specific filename is provided.

In SitemapServiceProvider.php, the route configuration has been updated to only accept requests for the specific 'sitemap.xml' file. This restricts the route to handle requests for the sitemap.xml file exclusively, ensuring a more focused and secure routing for sitemap requests.

These changes improve the flexibility and security of the sitemap functionality, providing a more robust and efficient handling of sitemap files within the project.

thejmitchener and others added 3 commits July 7, 2024 14:19
…default sitemap file name and update the route to only accept requests for the specific sitemap.xml file.
Bumps [laravel/pint](https://github.com/laravel/pint) from 1.16.0 to 1.16.1.
- [Release notes](https://github.com/laravel/pint/releases)
- [Changelog](https://github.com/laravel/pint/blob/main/CHANGELOG.md)
- [Commits](laravel/pint@v1.16.0...v1.16.1)

---
updated-dependencies:
- dependency-name: laravel/pint
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Joshua Mitchener <[email protected]>
@thejmitchener thejmitchener requested a review from a team July 7, 2024 18:22
@thejmitchener thejmitchener merged commit 0f14318 into main Jul 7, 2024
10 checks passed
@thejmitchener thejmitchener deleted the hardcode-sitemap-route-temp-fix branch July 7, 2024 18:23
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.

1 participant