-
Notifications
You must be signed in to change notification settings - Fork 101
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
route context not generating as expected #335
Labels
Comments
https://presta.wip/sitemap.xml I want to define my own route there and when I dump, when I dump I get the IP address and port. framework:
router:
default_uri: 'https://example.org/my/path/'
parameters:
asset.request_context.base_path: my-proxy-domain.wip:9001
asset.request_context.secure: true
# config/services.yaml
router.request_context.scheme: 'https' |
I can check in my changes to the demo proxy, using Symfony 7, if that helps. |
I've checked this thing on my side, and it seems to work like a charm : # config/packages/routing.yaml
framework:
router:
default_uri: 'https://my-wonderful-host.com/prefixed' <?xml version="1.0" encoding="UTF-8"?>
<sitemapindex xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/siteindex.xsd"
xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<sitemap>
<loc>https://my-wonderful-host.com/sitemap.default.xml</loc>
<lastmod>2024-02-05T09:18:28+01:00</lastmod>
</sitemap>
</sitemapindex> <?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://my-wonderful-host.com/prefixed/</loc>
<lastmod>2024-02-05T09:18:28+01:00</lastmod>
<changefreq>daily</changefreq>
<priority>0.5</priority>
</url>
<url>
<loc>https://my-wonderful-host.com/prefixed/about</loc>
<lastmod>2024-01-23T11:52:33+01:00</lastmod>
<changefreq>daily</changefreq>
<priority>0.5</priority>
</url>
<url>
<loc>https://my-wonderful-host.com/prefixed/notre-expertise</loc>
<lastmod>2024-01-24T11:52:36+01:00</lastmod>
<changefreq>daily</changefreq>
<priority>0.5</priority>
</url>
</urlset>
|
The MR about the doc was merged, hope this helps |
Hmm, not working for me. Can you try with my fork please? git clone [email protected]:tacman/presta-sitemap-test-project.git presta && cd presta
composer install
bin/console doctrine:database:create
bin/console doctrine:schema:update --force --complete
bin/console doctrine:fixtures:load --no-interaction
symfony server:start -d
symfony open:local --path=sitemap.xml
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Package version(s) affected: 4.0
Description
When dumping routes, Symfony uses the context. The description in the documentation isn't right, it should be
https://symfony.com/blog/new-in-symfony-5-1-simpler-request-context
But regardless, I'm having trouble getting it to work.
It shouldn't just be the dump command, it should be in the generation as well for dynamic routes.
The text was updated successfully, but these errors were encountered: